提交 12dc5e62 编写于 作者: H Herbert Xu

[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: NHerbert Xu <herbert@gondor.apana.org.au>
上级 c2c61f51
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册