tcpdump/tcpdump-3.9.1-isis_dos.patch

26 lines
895 B
Diff
Raw Permalink Normal View History

--- tcpdump-3.9.1/print-isoclns.c.orig 2005-07-06 15:05:30.000000000 +0200
+++ tcpdump-3.9.1/print-isoclns.c 2005-07-06 15:05:34.000000000 +0200
@@ -2121,13 +2121,15 @@ static int isis_print (const u_int8_t *p
}
tmp --;
printf("\n\t LAN address length %u bytes ",lan_alen);
- while (tmp >= lan_alen) {
- if (!TTEST2(*tptr, lan_alen))
- goto trunctlv;
- printf("\n\t\tIS Neighbor: %s",isis_print_id(tptr,lan_alen));
- tmp -= lan_alen;
- tptr +=lan_alen;
- }
+ if(lan_alen >= SYSTEM_ID_LEN) {
+ while (tmp >= lan_alen) {
+ if (!TTEST2(*tptr, lan_alen))
+ goto trunctlv;
+ printf("\n\t\tIS Neighbor: %s",isis_print_id(tptr,lan_alen));
+ tmp -= lan_alen;
+ tptr +=lan_alen;
+ }
+ }
break;
case ISIS_TLV_PADDING: