aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/crypto/shash.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/shash.c')
-rw-r--r--crypto/shash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/shash.c b/crypto/shash.c
index c4a724e55d7a..44a6df3132ad 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -479,6 +479,8 @@ static int shash_prepare_alg(struct shash_alg *alg)
if (alg->descsize > HASH_MAX_DESCSIZE)
return -EINVAL;
+ if (alg->statesize > HASH_MAX_STATESIZE)
+ return -EINVAL;
return 0;
}