From 09acdee3e1f3252a909e44cde05f57b59f2398ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Sun, 25 Mar 2018 14:48:50 +0000 Subject: [PATCH] Code cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- mud.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mud.c b/mud.c index c9b38d4..46e28d7 100644 --- a/mud.c +++ b/mud.c @@ -1088,9 +1088,11 @@ mud_packet_send(struct mud *mud, enum mud_packet_code code, switch (code) { case mud_conf: size = sizeof(packet->data.conf); - memcpy(&packet->data.conf.public.local, &mud->crypto.public.local, + memcpy(&packet->data.conf.public.local, + &mud->crypto.public.local, sizeof(mud->crypto.public.local)); - memcpy(&packet->data.conf.public.remote, &mud->crypto.public.remote, + memcpy(&packet->data.conf.public.remote, + &mud->crypto.public.remote, sizeof(mud->crypto.public.remote)); packet->data.conf.aes = (unsigned char)mud->crypto.aes; break;