aboutsummaryrefslogtreecommitdiffstats
path: root/print-juniper.c
diff options
context:
space:
mode:
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 ff1de9c03d15..a96989528601 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)