From 75cf728fa90d6f5acfdace3a174eb63ce23e20fa Mon Sep 17 00:00:00 2001 From: gcf <95608083+slark-yuxj@users.noreply.github.com> Date: Sun, 19 May 2024 16:27:19 +0800 Subject: [PATCH] The gpt pointer is not initialized, and when offset < 0, it may result in freeing unallocated memory. (#2499) Signed-off-by: yuxiaojun Co-authored-by: yuxiaojun --- GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c index 26baa8b4..45ce7c6c 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c @@ -504,7 +504,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char * vhd_footer_t vhdfoot; VDIPREHEADER vdihdr; char type[16] = {0}; - ventoy_gpt_info *gpt; + ventoy_gpt_info *gpt = NULL; (void)ctxt;