From 51e180c4fb05a88ad6687a23cc983955cd9ea431 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 8 Sep 2020 05:04:58 +0100 Subject: Remove 96 assorted ND_TCHECK calls. Remove a number of instances that do not match common patterns and have the only substantial effect on the code flow that a truncated packet triggers "goto trunc" instead of longjmp(). (In a few cases this change can increase the number of fields printed before giving up.) --- print-chdlc.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'print-chdlc.c') diff --git a/print-chdlc.c b/print-chdlc.c index 5d45074d..e0accf9e 100644 --- a/print-chdlc.c +++ b/print-chdlc.c @@ -60,7 +60,6 @@ chdlc_print(netdissect_options *ndo, const u_char *p, u_int length) ndo->ndo_protocol = "chdlc"; if (length < CHDLC_HDRLEN) goto trunc; - ND_TCHECK_LEN(p, CHDLC_HDRLEN); proto = GET_BE_U_2(p + 2); if (ndo->ndo_eflag) { ND_PRINT("%s, ethertype %s (0x%04x), length %u: ", @@ -96,7 +95,6 @@ chdlc_print(netdissect_options *ndo, const u_char *p, u_int length) /* is the fudge byte set ? lets verify by spotting ISO headers */ if (length < 2) goto trunc; - ND_TCHECK_2(p); if (GET_U_1(p + 1) == NLPID_CLNP || GET_U_1(p + 1) == NLPID_ESIS || GET_U_1(p + 1) == NLPID_ISIS) -- cgit v1.2.1