The gpt pointer is not initialized, and when offset < 0, it may result in freeing unallocated memory. (#2499)

Signed-off-by: yuxiaojun <yuxiaojun1011@outlook.com>
Co-authored-by: yuxiaojun <yuxiaojun1011@outlook.com>
pull/2767/merge
gcf 4 weeks ago committed by GitHub
parent 8723aeb4cc
commit 75cf728fa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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;

Loading…
Cancel
Save