From: Saverio Proto Date: Thu, 10 Apr 2014 11:10:22 +0000 (+0200) Subject: Fix memcpy when filling packet data X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=8c223ae8b641abc6fa1e0c516fc05143dad673ad;p=meshlink Fix memcpy when filling packet data --- 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;