]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tipc: fix keylen check
authorAndrea Claudi <aclaudi@redhat.com>
Fri, 13 May 2022 09:52:30 +0000 (11:52 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 17 May 2022 19:57:45 +0000 (12:57 -0700)
commit4429a6c9b484bc02dfab1e020a9b6f9f77370331
treeeb75a4b780c9ae8d6f89addab8ad589ce667625b
parent6b6979b9d443d5008e9db5dbf2849de619a8fa67
tipc: fix keylen check

Key length check in str2key() is wrong for hex. Fix this using the
proper hex key length.

Fixes: 28ee49e5153b ("tipc: bail out if key is abnormally long")
Suggested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tipc/misc.c