]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Avoid -E and -M options inconsistencies with no libcrypto
[tcpdump] / print-ip.c
index a332bd7885fe4f77f84f74944068dafadab93d20..9621dada32b1821e51ba960f6f722b2d9b86b2c4 100644 (file)
@@ -426,7 +426,7 @@ ip_print(netdissect_options *ndo,
                 ND_PRINT(")");
             }
 
-           if (!ndo->ndo_Kflag && (const u_char *)ip + hlen <= ndo->ndo_snapend) {
+           if (!ndo->ndo_Kflag && ND_TTEST_LEN((const u_char *)ip, hlen)) {
                vec[0].ptr = (const uint8_t *)(const void *)ip;
                vec[0].len = hlen;
                sum = in_cksum(vec, 1);