aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/shash.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/shash.c')
-rw-r--r--crypto/shash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index 5d732c6bb4b2..86d76b5c626c 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -458,9 +458,9 @@ static int shash_prepare_alg(struct shash_alg *alg)
458{ 458{
459 struct crypto_alg *base = &alg->base; 459 struct crypto_alg *base = &alg->base;
460 460
461 if (alg->digestsize > PAGE_SIZE / 8 || 461 if (alg->digestsize > HASH_MAX_DIGESTSIZE ||
462 alg->descsize > PAGE_SIZE / 8 || 462 alg->descsize > HASH_MAX_DESCSIZE ||
463 alg->statesize > PAGE_SIZE / 8) 463 alg->statesize > HASH_MAX_STATESIZE)
464 return -EINVAL; 464 return -EINVAL;
465 465
466 base->cra_type = &crypto_shash_type; 466 base->cra_type = &crypto_shash_type;