]> 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]>
Wed, 20 May 2015 22:24:17 +0000 (15:24 -0700)
Fixes GitHub issue #437.

print-isoclns.c

index bc710e4aa8e9e89469f15970ff693e068cc29a3f..67d5215bc903ca462e6a96269a297ff03ef8c455 100644 (file)
@@ -1057,7 +1057,7 @@ esis_print(netdissect_options *ndo,
 
        if (li < sizeof(struct esis_header_t) + 2) {
             ND_PRINT((ndo, " length indicator < min PDU size %d:", li));
-            while (--length != 0)
+            while (pptr < ndo->ndo_snapend)
                 ND_PRINT((ndo, "%02X", *pptr++));
             return;
        }