summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2013-08-07 21:22:35 +0200
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2013-08-07 21:22:35 +0200
commit8a9c24996670057d58701b60405db061840d9ac2 (patch)
treeb5236bc33e24e8c8a391883d866ffccc7893f00f
parentada2248de61130b216b0a332f9b19227541befea (diff)
downloadMAC-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.c2
1 files changed, 1 insertions, 1 deletions
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);