Commit 6567299a authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

[IPV6]: Fix aalg check in esp.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 763e4a8e
......@@ -302,8 +302,9 @@ int esp6_init_state(struct xfrm_state *x, void *args)
{
struct esp_data *esp = NULL;
/* null auth and encryption can have zero length keys */
if (x->aalg) {
if (x->aalg->alg_key_len == 0 || x->aalg->alg_key_len > 512)
if (x->aalg->alg_key_len > 512)
goto error;
}
if (x->ealg == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment