summaryrefslogtreecommitdiff
path: root/print-chdlc.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2020-09-08 05:04:58 +0100
committerDenis Ovsienko <denis@ovsienko.info>2020-09-08 05:04:58 +0100
commit51e180c4fb05a88ad6687a23cc983955cd9ea431 (patch)
tree3bfe3b338b58f8ef556cd039e3443153635e7fce /print-chdlc.c
parent24df77f09e26a72f662a82b92645707e0572d1cc (diff)
downloadtcpdump-51e180c4fb05a88ad6687a23cc983955cd9ea431.tar.gz
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.)
Diffstat (limited to 'print-chdlc.c')
-rw-r--r--print-chdlc.c2
1 files changed, 0 insertions, 2 deletions
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)