summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-09-21 22:45:43 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2017-09-25 07:14:06 +0200
commit373b8eeb0c15d4ce58f62afb12f213b1b5bbc3d3 (patch)
treea5ddc1316898c7b3cc481b45451eef98cf3e8585 /net/xfrm/xfrm_user.c
parentforcedeth: optimize the xmit/rx with unlikely (diff)
downloadlinux-373b8eeb0c15d4ce58f62afb12f213b1b5bbc3d3.tar.xz
linux-373b8eeb0c15d4ce58f62afb12f213b1b5bbc3d3.zip
xfrm: make aead_len() return unsigned int
Key lengths can't be negative. Comparison with nla_len() is left signed just in case negative value can sneak in there. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 2bfbd9121e3b..32c67b80c3ce 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -84,7 +84,7 @@ static int verify_aead(struct nlattr **attrs)
return 0;
algp = nla_data(rt);
- if (nla_len(rt) < aead_len(algp))
+ if (nla_len(rt) < (int)aead_len(algp))
return -EINVAL;
algp->alg_name[sizeof(algp->alg_name) - 1] = '\0';