summaryrefslogtreecommitdiff
path: root/crypto/authenc.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-10 10:55:21 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:16:38 +1100
commita37a709375f7681e98b1de3753506be5523c793f (patch)
tree01fe12bf04865a7e6610703a3338870ebb1ddb1a /crypto/authenc.c
parentde34b3a0c2a0ab48fa600e3a18e00a77d8347a51 (diff)
downloadlinux-crypto-a37a709375f7681e98b1de3753506be5523c793f.tar.gz
linux-crypto-a37a709375f7681e98b1de3753506be5523c793f.zip
[CRYPTO] authenc: Use RTA_OK to check length
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>
Diffstat (limited to '')
-rw-r--r--crypto/authenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 80d9d0b1..aa442dea 100644
--- 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;