summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-06-09 15:54:42 +0000
committersam <sam@FreeBSD.org>2005-06-09 15:54:42 +0000
commite1999dee5d4d47507b9e1e46812c6cfff9b8b26e (patch)
tree0ca88a15e4c4b8aaefedf1a28cb1164b6049ecd2 /contrib
parent22f120bd5ede6c64cd5ec50d807a7ad7674ca484 (diff)
downloadFreeBSD-src-e1999dee5d4d47507b9e1e46812c6cfff9b8b26e.zip
FreeBSD-src-e1999dee5d4d47507b9e1e46812c6cfff9b8b26e.tar.gz
pullup security fix on vendor branch
Diffstat (limited to 'contrib')
-rw-r--r--contrib/tcpdump/print-isoclns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-isoclns.c b/contrib/tcpdump/print-isoclns.c
index 9f2e8c3..444e056 100644
--- a/contrib/tcpdump/print-isoclns.c
+++ b/contrib/tcpdump/print-isoclns.c
@@ -1907,6 +1907,9 @@ static int isis_print (const u_int8_t *p, u_int length)
tlv_type,
tlv_len);
+ if (tlv_len == 0) /* something is malformed */
+ break;
+
/* now check if we have a decoder otherwise do a hexdump at the end*/
switch (tlv_type) {
case ISIS_TLV_AREA_ADDR:
@@ -1937,7 +1940,7 @@ static int isis_print (const u_int8_t *p, u_int length)
break;
case ISIS_TLV_ISNEIGH_VARLEN:
- if (!TTEST2(*tptr, 1))
+ if (!TTEST2(*tptr, 1) || tmp < 3) /* min. TLV length */
goto trunctlv;
lan_alen = *tptr++; /* LAN adress length */
tmp --;
OpenPOWER on IntegriCloud