]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
The gpt pointer is not initialized, and when offset < 0, it may result in freeing...
authorgcf <95608083+slark-yuxj@users.noreply.github.com>
Sun, 19 May 2024 08:27:19 +0000 (16:27 +0800)
committerGitHub <noreply@github.com>
Sun, 19 May 2024 08:27:19 +0000 (16:27 +0800)
Signed-off-by: yuxiaojun <yuxiaojun1011@outlook.com>
Co-authored-by: yuxiaojun <yuxiaojun1011@outlook.com>
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c

index 26baa8b49c52bbc7a6cae2072d3771aed28c9aff..45ce7c6cbdb1376769d7aa51df730bc3680fa15f 100644 (file)
@@ -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;