diff options
Diffstat (limited to 'contrib/tcpdump/print-babel.c')
-rw-r--r-- | contrib/tcpdump/print-babel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-babel.c b/contrib/tcpdump/print-babel.c index f8741d7bfd19..0bb2483adedb 100644 --- a/contrib/tcpdump/print-babel.c +++ b/contrib/tcpdump/print-babel.c @@ -352,6 +352,8 @@ babel_print_v2(netdissect_options *ndo, goto invalid; bodylen = EXTRACT_16BITS(cp + 2); ND_PRINT((ndo, " (%u)", bodylen)); + if (4U + bodylen > length) + goto invalid; /* Process the TLVs in the body */ i = 0; @@ -480,7 +482,7 @@ babel_print_v2(netdissect_options *ndo, case MESSAGE_UPDATE: { if (!ndo->ndo_vflag) { ND_PRINT((ndo, " update")); - if(len < 1) + if(len < 10) ND_PRINT((ndo, "/truncated")); else ND_PRINT((ndo, "%s%s%s", |