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

index 74ce023dbd17552361d9d6937d43439ce17482f3..d60aca5d43dfce99a52fd9d7ea0b100e40c9e167 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.135 2005-04-25 09:09:11 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.136 2005-04-25 10:41:06 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) {