loader/i386/bsd: Fix uninitialized scalar variable

In the function grub_netbsd_setup_video(), struct grub_netbsd_btinfo_framebuf
params is called but isn't being initialized. The member grub_uint8_t
reserved[16] isn't set to any values and is instead filled with junk data from
the stack. We can prevent this by setting params to {0}.

Fixes: CID 375026

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Alec Brown 2022-03-21 02:28:56 -04:00 committed by Daniel Kiper
parent 8e9e0d4643
commit c0272c12b6

View File

@ -929,7 +929,7 @@ grub_netbsd_setup_video (void)
struct grub_video_mode_info mode_info;
void *framebuffer;
const char *modevar;
struct grub_netbsd_btinfo_framebuf params;
struct grub_netbsd_btinfo_framebuf params = {0};
grub_err_t err;
grub_video_driver_id_t driv_id;