mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
efi_loader: fix possible buffer overflow
Variable "final" will have SHA512 digest, but currently the array size is not sufficient. Let's fix it. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
e8287b0fb2
commit
b1a7a5e0b8
1 changed files with 1 additions and 1 deletions
|
@ -515,7 +515,7 @@ static efi_status_t tcg2_create_digest(const u8 *input, u32 length,
|
|||
sha1_context ctx;
|
||||
sha256_context ctx_256;
|
||||
sha512_context ctx_512;
|
||||
u8 final[TPM2_ALG_SHA512];
|
||||
u8 final[TPM2_SHA512_DIGEST_SIZE];
|
||||
efi_status_t ret;
|
||||
u32 active;
|
||||
int i;
|
||||
|
|
Loading…
Reference in a new issue