From 8c223ae8b641abc6fa1e0c516fc05143dad673ad Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Thu, 10 Apr 2014 13:10:22 +0200 Subject: [PATCH] Fix memcpy when filling packet data --- src/libmeshlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libmeshlink.c b/src/libmeshlink.c index f84642df..ca03b791 100644 --- a/src/libmeshlink.c +++ b/src/libmeshlink.c @@ -565,8 +565,8 @@ bool tinc_send_packet(node_t *receiver, const char* buf, unsigned int len) { packet.priority = 0; - memcpy(packet.data,hdr,sizeof(hdr)); - memcpy(packet.data+sizeof(hdr),buf,len); + memcpy(packet.data,hdr,32); + memcpy(packet.data+32,buf,len); myself->in_packets++; myself->in_bytes += packet.len; -- 2.39.5