]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-802_11.c
CVE-2017-12987/IEEE 802.11: Fix processing of TIM IE.
[tcpdump] / print-802_11.c
index 1bbe47ace504c4674be06db14d664d84fbdc6e34..17c1f70cb6cd752004117e02c53744c3705db71d 100644 (file)
@@ -1189,8 +1189,7 @@ parse_elements(netdissect_options *ndo,
                        offset += 3;
                        length -= 3;
 
-                       memcpy(tim.bitmap, p + (tim.length - 3),
-                           (tim.length - 3));
+                       memcpy(tim.bitmap, p + offset + 3, tim.length - 3);
                        offset += tim.length - 3;
                        length -= tim.length - 3;
                        /*