Message ID | 1447409428-12178-29-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/crypto/ahash.c b/crypto/ahash.c index f2a5d8f656ff..d3e86a46ecea 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -537,7 +537,8 @@ static int ahash_prepare_alg(struct ahash_alg *alg) struct crypto_alg *base = &alg->halg.base; if (alg->halg.digestsize > PAGE_SIZE / 8 || - alg->halg.statesize > PAGE_SIZE / 8) + alg->halg.statesize > PAGE_SIZE / 8 || + alg->halg.statesize == 0) return -EINVAL; base->cra_type = &crypto_ahash_type;