tc: m_action: check cookie hex string len
Subsystems (2)
PATCH 1/1 tc: m_action: check cookie hex string len
From: Jiri Pirko <[email protected]>
Check the cookie hex string len is dividable by 2 as the valid hex string always should be.
Reported-by Alex Kushnarov <[email protected]>
Signed-off-by Jiri Pirko <[email protected]>
--- tc/m_action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tc/m_action.c +2 -1
@@ -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);
Signature · 1 line
2.21.1
Stephen Hemminger
AppliedQuoted 8 lines · On Mon, 27 Apr 2020 08:10:55 +0200 Jiri Pirko <[email protected]> wrote:
From: Jiri Pirko <[email protected]>
Check the cookie hex string len is dividable by 2 as the valid hex string always should be.
Reported-by Alex Kushnarov <[email protected]>Signed-off-by Jiri Pirko <[email protected]>---
Applied