Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e38d200 authored by Will Thomas's avatar Will Thomas Committed by Herbert Xu
Browse files

crypto: img-hash - Fix set_reqsize call



Properly allocate enough memory to respect the fallback.

Signed-off-by: default avatarWill Thomas <will.thomas@imgtec.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent fb67740e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -686,6 +686,7 @@ static int img_hash_cra_init(struct crypto_tfm *tfm, const char *alg_name)
	}
	crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
				 sizeof(struct img_hash_request_ctx) +
				 crypto_ahash_reqsize(ctx->fallback) +
				 IMG_HASH_DMA_THRESHOLD);

	return 0;