X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6d20b784a387cffc95a589da1cec1af07dbf1381..8d32220a44bfd218758f8e9ca615ab73eefa0ca8:/print-babel.c diff --git a/print-babel.c b/print-babel.c index 6f03e146..7dba0765 100644 --- a/print-babel.c +++ b/print-babel.c @@ -359,6 +359,8 @@ babel_print_v2(netdissect_options *ndo, goto invalid; bodylen = GET_BE_U_2(cp + 2); ND_PRINT(" (%u)", bodylen); + if (4U + bodylen > length) + goto invalid; /* Process the TLVs in the body */ i = 0;