aboutsummaryrefslogtreecommitdiff
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-01-14 22:26:03 +0800
committerAlex Shi <alex.shi@linaro.org>2016-01-14 22:26:03 +0800
commit8fa6d2e1fe937af9dbacb5aad8c43dbb67466fa0 (patch)
tree53b1cbcaec14e50f491e1cb1f20106c7a15c70e8 /crypto/ahash.c
parent74bc3fe5f5fbb50d63fd002ce240cc7bca236db1 (diff)
parentf90ae1b62bedd8b57966a7be68855f2d43170db6 (diff)
Merge branch 'linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-androidlsk-v3.18-16.01-android
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index f6a36a52d738..c1d8591913e9 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -543,7 +543,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;