projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2c61f5
)
[CRYPTO] authenc: Use RTA_OK to check length
author
Herbert Xu
<herbert@gondor.apana.org.au>
Mon, 10 Dec 2007 02:55:21 +0000
(10:55 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Thu, 10 Jan 2008 21:16:38 +0000
(08:16 +1100)
This patch changes setkey to use RTA_OK to check the validity of the
setkey request.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/authenc.c
patch
|
blob
|
history
diff --git
a/crypto/authenc.c
b/crypto/authenc.c
index
80d9d0b
..
aa442de
100644
(file)
--- a/
crypto/authenc.c
+++ b/
crypto/authenc.c
@@
-44,7
+44,7
@@
static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
struct crypto_authenc_key_param *param;
int err = -EINVAL;
- if (
keylen < sizeof(*rta
))
+ if (
!RTA_OK(rta, keylen
))
goto badkey;
if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM)
goto badkey;