Message ID | 20200427061055.4058-1-jiri@resnulli.us |
---|---|
State | New |
Headers | show |
Series | [iproute2] tc: m_action: check cookie hex string len | expand |
diff --git a/tc/m_action.c b/tc/m_action.c index 108329db29d0..b41782de9a02 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -291,7 +291,8 @@ done0: invarg(cookie_err_m, *argv); } - if (hex2mem(*argv, act_ck, slen / 2) < 0) + if (slen % 2 || + hex2mem(*argv, act_ck, slen / 2) < 0) invarg("cookie must be a hex string\n", *argv);