diff options
Diffstat (limited to 'crypto/authenc.c')
-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, | |||
44 | struct crypto_authenc_key_param *param; | 44 | struct crypto_authenc_key_param *param; |
45 | int err = -EINVAL; | 45 | int err = -EINVAL; |
46 | 46 | ||
47 | if (keylen < sizeof(*rta)) | 47 | if (!RTA_OK(rta, keylen)) |
48 | goto badkey; | 48 | goto badkey; |
49 | if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) | 49 | if (rta->rta_type != CRYPTO_AUTHENC_KEYA_PARAM) |
50 | goto badkey; | 50 | goto badkey; |