]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-icmp.c
CVE-2017-13029/PPP: Fix a bounds check, and clean up other bounds checks.
[tcpdump] / print-icmp.c
index ec7525357fcd8044b24e5aead604462e2b271849..366094eff829c08e519017334fdaa656ce40e333 100644 (file)
@@ -581,6 +581,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char *
                ND_PRINT((ndo, "\n\t"));
                ip = (const struct ip *)bp;
                 snapend_save = ndo->ndo_snapend;
+               ND_TCHECK_16BITS(&ip->ip_len);
                ip_print(ndo, bp, EXTRACT_16BITS(&ip->ip_len));
                 ndo->ndo_snapend = snapend_save;
        }