Message ID | 1447370309-357-77-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/crypto/ahash.c b/crypto/ahash.c index f6a36a5..c1d8591 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -543,7 +543,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;