diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-08-07 21:22:35 +0200 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2013-08-07 21:22:35 +0200 |
commit | 8a9c24996670057d58701b60405db061840d9ac2 (patch) | |
tree | b5236bc33e24e8c8a391883d866ffccc7893f00f | |
parent | ada2248de61130b216b0a332f9b19227541befea (diff) | |
download | MAC-Telnet-8a9c24996670057d58701b60405db061840d9ac2.tar.gz MAC-Telnet-8a9c24996670057d58701b60405db061840d9ac2.zip |
Fix bug where sizeof checked the pointer instead of the struct, thanks to bparker06 for reporting.
-rw-r--r-- | protocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |