Message ID | 1447451306-14024-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/crypto/ahash.c b/crypto/ahash.c index 793a27f..857ae2b 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -462,7 +462,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;