summaryrefslogtreecommitdiff
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-02 09:33:25 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-12-02 09:33:25 -0800
commitef0902bd956672dc33d6f7dd7bcaff9f769ac5c3 (patch)
tree50a07d35f4a47620c4c611db434bf4fce05b9260 /crypto/ahash.c
parent82d748eb43a673a56b639efd4d698e1e95715d82 (diff)
parentd3dd09594f91ee57e76cbc27023b214afa01a99a (diff)
downloadlinux-crypto-ef0902bd956672dc33d6f7dd7bcaff9f769ac5c3.tar.gz
linux-crypto-ef0902bd956672dc33d6f7dd7bcaff9f769ac5c3.zip
Merge tag 'v4.4-rc3' into next
Merge with Linux 4.4-rc3 to bring in helpers for multiu-driver modules.
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 8acb8860..9c1dc8d6 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;