Skip to content

Commit

Permalink
Fix bug where sizeof checked the pointer instead of the struct, thank…
Browse files Browse the repository at this point in the history
…s to bparker06 for reporting.
  • Loading branch information
haakonnessjoen committed Aug 7, 2013
1 parent ada2248 commit 8a9c249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocol.c
Expand Up @@ -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);

Expand Down

0 comments on commit 8a9c249

Please sign in to comment.