]> 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:01:14 +0000 (11:01 -0800)
Fixes GitHub issue #437.

print-isoclns.c

index e990a91d4893092ddfb9a455b90c3afec6bea1b2..50227a71d808c572e193952b5d3f0fb831f3d4a7 100644 (file)
@@ -1055,7 +1055,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;
        }