diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-10 03:55:21 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 22:16:38 +0100 |
commit | 12dc5e62b4f93f1d399fd81e35be3f9ea0027712 (patch) | |
tree | 413a29344ae74030c2ef27d34dd70b396c51a1e1 /crypto | |
parent | [CRYPTO] authenc: Fix typo in ivsize (diff) | |
download | linux-12dc5e62b4f93f1d399fd81e35be3f9ea0027712.tar.xz linux-12dc5e62b4f93f1d399fd81e35be3f9ea0027712.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 'crypto')
-rw-r--r-- | crypto/authenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index 80d9d0b18c13..aa442dea5c43 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; |