Commit dbaaba1d0abf6871c7db6e3d15a46206bc386db1
1 parent
f176e632ef
Exists in
master
and in
7 other branches
crypto: hash - Fix digest size check for digest type
The changeset ca786dc738f4f583b57b1bba7a335b5e8233f4b0 crypto: hash - Fixed digest size check missed one spot for the digest type. This patch corrects that error. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
crypto/digest.c
... | ... | @@ -225,7 +225,7 @@ |
225 | 225 | struct ahash_tfm *crt = &tfm->crt_ahash; |
226 | 226 | struct digest_alg *dalg = &tfm->__crt_alg->cra_digest; |
227 | 227 | |
228 | - if (dalg->dia_digestsize > crypto_tfm_alg_blocksize(tfm)) | |
228 | + if (dalg->dia_digestsize > PAGE_SIZE / 8) | |
229 | 229 | return -EINVAL; |
230 | 230 | |
231 | 231 | crt->init = digest_async_init; |