|
@@ -544,7 +544,8 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
|
|
struct crypto_alg *base = &alg->halg.base;
|
|
struct crypto_alg *base = &alg->halg.base;
|
|
|
|
|
|
if (alg->halg.digestsize > PAGE_SIZE / 8 ||
|
|
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;
|
|
return -EINVAL;
|
|
|
|
|
|
base->cra_type = &crypto_ahash_type;
|
|
base->cra_type = &crypto_ahash_type;
|