aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <[email protected]>2017-09-21 20:46:30 +0000
committerSteffen Klassert <[email protected]>2017-09-25 05:14:06 +0000
commit06cd22f830f28023b82455c82c7db65fc6cf9c16 (patch)
tree3274d9055df20b977126ebf9db2fd69e0f17b402 /net/xfrm/xfrm_user.c
parentxfrm: make aead_len() return unsigned int (diff)
downloadkernel-06cd22f830f28023b82455c82c7db65fc6cf9c16.tar.gz
kernel-06cd22f830f28023b82455c82c7db65fc6cf9c16.zip
xfrm: make xfrm_alg_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 <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
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 32c67b80c3ce..09512d90e6a5 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -42,7 +42,7 @@ static int verify_one_alg(struct nlattr **attrs, enum xfrm_attr_type_t type)
return 0;
algp = nla_data(rt);
- if (nla_len(rt) < xfrm_alg_len(algp))
+ if (nla_len(rt) < (int)xfrm_alg_len(algp))
return -EINVAL;
switch (type) {