Skip to content

Commit efcb50f

Browse files
opanait-wrherbertx
authored andcommitted
crypto: sahara - fix ahash reqsize
Set the reqsize for sha algorithms to sizeof(struct sahara_sha_reqctx), the extra space is not needed. Fixes: 5a2bb93 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent d1d6351 commit efcb50f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/crypto/sahara.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,8 +1160,7 @@ static int sahara_sha_import(struct ahash_request *req, const void *in)
11601160
static int sahara_sha_cra_init(struct crypto_tfm *tfm)
11611161
{
11621162
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
1163-
sizeof(struct sahara_sha_reqctx) +
1164-
SHA_BUFFER_LEN + SHA256_BLOCK_SIZE);
1163+
sizeof(struct sahara_sha_reqctx));
11651164

11661165
return 0;
11671166
}

0 commit comments

Comments
 (0)