From: Guy Harris Date: Sun, 1 Mar 2015 19:00:21 +0000 (-0800) Subject: Don't run past the snaplength when printing a packet with a too-short LI. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/1bafbdaf19c8eb6fdd792ce529bda4fabc6d0595 Don't run past the snaplength when printing a packet with a too-short LI. Fixes GitHub issue #437. --- diff --git a/print-isoclns.c b/print-isoclns.c index 4f8a5bb7..15d7294b 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -1068,7 +1068,7 @@ esis_print(const u_int8_t *pptr, u_int length) if (li < sizeof(struct esis_header_t) + 2) { printf(" length indicator < min PDU size %d:", li); - while (--length != 0) + while (pptr < snapend) printf("%02X", *pptr++); return; }