]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - crypto/hash.c
crypto: hash - Fixed digest size check
[linux-2.6-omap-h63xx.git] / crypto / hash.c
index f9400a014e74b3bbb3147b046aae36dad6abfad4..0d7caa9ab748d96883f4dbfeb2612aab5b5e314f 100644 (file)
@@ -152,7 +152,7 @@ static int crypto_init_hash_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
 {
        struct hash_alg *alg = &tfm->__crt_alg->cra_hash;
 
-       if (alg->digestsize > crypto_tfm_alg_blocksize(tfm))
+       if (alg->digestsize > PAGE_SIZE / 8)
                return -EINVAL;
 
        if ((mask & CRYPTO_ALG_TYPE_HASH_MASK) != CRYPTO_ALG_TYPE_HASH_MASK)