]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add some additional length checking.
authorguy <guy>
Thu, 16 Jun 2005 01:10:21 +0000 (01:10 +0000)
committerguy <guy>
Thu, 16 Jun 2005 01:10:21 +0000 (01:10 +0000)
print-ldp.c

index f7437440d765278bb16c6007354d9c6d34685223..a3e7a2dc1f7d5e1b4ce9f03008e6d144c029e4fa 100644 (file)
@@ -16,7 +16,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.13 2005-05-03 08:21:09 hannes Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.14 2005-06-16 01:10:21 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -375,6 +375,8 @@ ldp_tlv_print(register const u_char *tptr) {
                 vc_info_tlv_len = *(tptr+1);
                 if (vc_info_tlv_len < 2)
                     break;
+                if (vc_info_len < vc_info_tlv_len)
+                    break;
 
                 printf("\n\t\tInterface Parameter: %s (0x%02x), len %u",
                        tok2str(ldp_fec_martini_ifparm_values,"Unknown",vc_info_tlv_type),