]> The Tcpdump Group git mirrors - tcpdump/commitdiff
check against min. TLV length / get if logic right
authorhannes <hannes>
Mon, 25 Apr 2005 10:44:24 +0000 (10:44 +0000)
committerhannes <hannes>
Mon, 25 Apr 2005 10:44:24 +0000 (10:44 +0000)
print-isoclns.c

index cfda033b7ace7392fd68f70d78dc0b32919e3c5f..2a0570717be88d95191a919b506e8bcbe31f51cf 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.106.2.7 2005-04-25 09:16:35 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.106.2.8 2005-04-25 10:44:24 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -1539,7 +1539,7 @@ static int isis_print (const u_int8_t *p, u_int length)
            break;
 
         case TLV_ISNEIGH_VARLEN:
-            if (!TTEST2(*tptr, 1) && tmp > 1)
+            if (!TTEST2(*tptr, 1) || tmp < 3) /* min. TLV length */
                goto trunctlv;
            lan_alen = *tptr++; /* LAN adress length */
             tmp --;