On Sun, 24 Nov 2024 at 22:27, Caleb Connolly <caleb.conno...@linaro.org> wrote:
>
> The key variable might be unitialised when accessed for the printf().
> Zero initialise it to avoid this.
>
> Signed-off-by: Caleb Connolly <caleb.conno...@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
>
Reviewed-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>

Reply via email to