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

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

crypto: img-hash - Fix hash request context



Move 0 length buffer to end of structure to stop overwriting
fallback request data. This doesn't cause a bug itself as the
buffer is never used alongside the fallback but should be
changed.

Signed-off-by: default avatarWill Thomas <will.thomas@imgtec.com>
Reviewed-by: default avatarJames Hartley <james.hartley@imgtec.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 10badea2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -102,8 +102,10 @@ struct img_hash_request_ctx {
	unsigned long		op;

	size_t			bufcnt;
	u8 buffer[0] __aligned(sizeof(u32));
	struct ahash_request	fallback_req;

	/* Zero length buffer must remain last member of struct */
	u8 buffer[0] __aligned(sizeof(u32));
};

struct img_hash_ctx {