aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hmac.c')
-rw-r--r--crypto/hmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c
index a68c1266121f..241b1868c1d0 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -157,6 +157,8 @@ static int hmac_init_tfm(struct crypto_tfm *tfm)
157 157
158 parent->descsize = sizeof(struct shash_desc) + 158 parent->descsize = sizeof(struct shash_desc) +
159 crypto_shash_descsize(hash); 159 crypto_shash_descsize(hash);
160 if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE))
161 return -EINVAL;
160 162
161 ctx->hash = hash; 163 ctx->hash = hash;
162 return 0; 164 return 0;