X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=crypto%2Fahash.c;h=9c1dc8d6106a89a0f853271c1dfc49cd301ec983;hb=b831ef2cad979912850e34f82415c0c5d59de8cb;hp=8acb886032ae7a604fe0e965eb5d3ce07dd4845b;hpb=2e455c27bddbf8cf6d1039daea40de8e6865c453;p=karo-tx-linux.git diff --git a/crypto/ahash.c b/crypto/ahash.c index 8acb886032ae..9c1dc8d6106a 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -544,7 +544,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;