]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isoclns.c
check against min. TLV length / get if logic right
[tcpdump] / print-isoclns.c
index 9ffe912d125b8fd769c07a32564fa3f5d0172233..7cf2881f57f0a7d48755a259f87f016e084179d7 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.2 2005-04-25 09:11:04 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.3 2005-04-25 10:43:24 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1938,7 +1938,7 @@ static int isis_print (const u_int8_t *p, u_int length)
            break;
 
         case ISIS_TLV_ISNEIGH_VARLEN:
-            if (!TTEST2(*tptr, 1) && tmp > 1)
+            if (!TTEST2(*tptr, 1) || tmp < 3) /* min. TLV length */
                goto trunctlv;
            lan_alen = *tptr++; /* LAN address length */
            if (lan_alen == 0) {