commit | b1006d2e464dcbe9e65584f241796feb305688a2 | [log] [tgz] |
---|---|---|
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | Sat Jun 02 09:32:56 2018 +0200 |
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | Sat Jun 02 09:32:56 2018 +0200 |
tree | 3272ee503c299a016b7e347023e47d67c8983daa | |
parent | 5fe61e70f1afddf691b6a944dcd1e369194259ec [diff] |
MPTCP: Add a bounds check
diff --git a/print-mptcp.c b/print-mptcp.c index 5a7cec8..631b4e8 100644 --- a/print-mptcp.c +++ b/print-mptcp.c
@@ -442,8 +442,13 @@ return 0; opt = (const struct mptcp_option *) cp; + ND_TCHECK_SIZE(opt); subtype = min(MPTCP_OPT_SUBTYPE(opt->sub_etc), MPTCP_SUB_FCLOSE + 1); ND_PRINT(" %s", mptcp_options[subtype].name); return mptcp_options[subtype].print(ndo, cp, len, flags); + +trunc: + nd_print_trunc(ndo); + return 0; }