[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>
diff --git a/crypto/authenc.c b/crypto/authenc.c
index 80d9d0b..aa442de 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -44,7 +44,7 @@
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;