]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't run past the snaplength when printing a packet with a too-short LI.
authorGuy Harris <[email protected]>
Sun, 1 Mar 2015 19:00:21 +0000 (11:00 -0800)
committerGuy Harris <[email protected]>
Sun, 1 Mar 2015 19:29:58 +0000 (11:29 -0800)
Fixes GitHub issue #437.

print-isoclns.c

index 57637055377b2c6c9c60f67e1b0ff076d08fee8e..b06643f1039b3cdff1b160918e4c1b2a6f9dc00e 100644 (file)
@@ -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;
        }