summaryrefslogtreecommitdiff
path: root/print-juniper.c
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2019-10-07 11:05:26 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2019-10-07 11:06:12 +0900
commitb0706e54b48af6c11783f55455842a292c4d9b17 (patch)
treee18f8e347693bf9a1297f5553716e84c9109246f /print-juniper.c
parentd722eee76c51a65c5449806c6fdacf2ac4f95055 (diff)
parent9ceaf0d786e9465506271e8450248a57719e4eb1 (diff)
downloadtcpdump-tizen_5.5_tv.tar.gz
tcpdump-tizen_5.5_tv.tar.bz2
tcpdump-tizen_5.5_tv.zip
Change-Id: Ib2ce6fe0c63523943f1fe7d772010824fe2c0d41
Diffstat (limited to 'print-juniper.c')
-rw-r--r--print-juniper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/print-juniper.c b/print-juniper.c
index ff1de9c..a969895 100644
--- a/print-juniper.c
+++ b/print-juniper.c
@@ -1354,6 +1354,11 @@ juniper_parse_header(netdissect_options *ndo,
lp->s,
l2info->cookie_len));
+ if (l2info->cookie_len > 8) {
+ ND_PRINT((ndo, " (invalid)"));
+ return 0;
+ }
+
if (l2info->cookie_len > 0) {
ND_TCHECK2(p[0], l2info->cookie_len);
if (ndo->ndo_eflag)