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

print-isoclns.c

index 4f8a5bb7d13a7d747d6a8bcae5973d2eef566f04..15d7294b1910e98ed9c864d0ebd126dbfeec592d 100644 (file)
@@ -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;
        }