From 3cb1082cb5ca0701728c5be20f691f59804f8c29 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 26 May 2020 22:13:02 -0700 Subject: esis: use ND_TTEST_LEN() and ND_BYTES_BETWEEN() on pointers. Using ND_TTEST_LEN() makes the check a bit more stringent. Using ND_BYTES_BETWEEN() casts the difference to a u_int, so it's 1) unsigned and 2) not 64-bit on LP64 or LLP64 platforms. --- print-isoclns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'print-isoclns.c') diff --git a/print-isoclns.c b/print-isoclns.c index 882da50a..b5943cc7 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -1382,8 +1382,8 @@ esis_print(netdissect_options *ndo, default: if (ndo->ndo_vflag <= 1) { - if (pptr < ndo->ndo_snapend) - print_unknown_data(ndo, pptr, "\n\t ", (int)(ndo->ndo_snapend - pptr)); + if (ND_TTEST_LEN(pptr, 1)) + print_unknown_data(ndo, pptr, "\n\t ", ND_BYTES_AVAILABLE_AFTER(pptr)); } return; } -- cgit v1.2.1