diff options
author | Guy Harris <gharris@sonic.net> | 2020-05-26 22:13:02 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-05-26 22:13:02 -0700 |
commit | 3cb1082cb5ca0701728c5be20f691f59804f8c29 (patch) | |
tree | 1284ec2a351efa3fce090ebc676d4edd24afd0a4 /print-isoclns.c | |
parent | ae251eb4a434dc68535aa307beca6358d905466b (diff) | |
download | tcpdump-3cb1082cb5ca0701728c5be20f691f59804f8c29.tar.gz |
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.
Diffstat (limited to 'print-isoclns.c')
-rw-r--r-- | print-isoclns.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |