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/eb4353f86c95707068fa75ce08b1159649bf184d 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 57637055..b06643f1 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -1014,7 +1014,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; }