From 8a9c24996670057d58701b60405db061840d9ac2 Mon Sep 17 00:00:00 2001 From: Håkon Nessjøen Date: Wed, 7 Aug 2013 21:22:35 +0200 Subject: Fix bug where sizeof checked the pointer instead of the struct, thanks to bparker06 for reporting. --- protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.c b/protocol.c index 4167d5e..a23920f 100644 --- a/protocol.c +++ b/protocol.c @@ -309,7 +309,7 @@ struct mt_mndp_info *parse_mndp(const unsigned char *data, const int packet_len) mndp_hdr = (struct mt_mndp_hdr*)data; - memcpy(&(packet.header), mndp_hdr, sizeof(mndp_hdr)); + memcpy(&(packet.header), mndp_hdr, sizeof(struct mt_mndp_hdr)); p = data + sizeof(struct mt_mndp_hdr); -- cgit v1.2.3