[PATCH RFC 01/14] cmd: efi: avoid unitialized read
Caleb Connolly
caleb.connolly at linaro.org
Sun Nov 24 21:26:57 CET 2024
The key variable might be unitialised when accessed for the printf().
Zero initialise it to avoid this.
Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
---
cmd/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/efi.c b/cmd/efi.c
index 687ccb520428..1fb67a83aae5 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -220,9 +220,9 @@ static void efi_print_mem_table(struct efi_mem_desc *desc, int desc_size,
static int do_efi_mem(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct efi_mem_desc *orig, *desc;
- uint version, key;
+ uint version, key = 0;
int desc_size;
int size, ret;
bool skip_bs;
--
2.47.0
More information about the U-Boot
mailing list