]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/i386/pc/linux: Fix uninitialized scalar variable
authorAlec Brown <alec.r.brown@oracle.com>
Mon, 21 Mar 2022 06:28:57 +0000 (02:28 -0400)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 4 Apr 2022 18:28:54 +0000 (20:28 +0200)
commit261e4511ce335cc3784cbbe6c99fd35a81efa059
tree7e5adce023064bcae0f31ef00d442aa8cf6786a4
parentc0272c12b6c895de21f88cbb6387cdec04ff48a5
loader/i386/pc/linux: Fix uninitialized scalar variable

In the function grub_linux16_boot(), struct grub_relocator16_state state is
called but isn't being initialized. This results in the members grub_uint32_t
ebx, grub_uint32_t edx, grub_uint32_t esi, and grub_uint32_t ebp being filled
with junk data from the stack since none of them are being set to any values.
We can prevent this by setting state to {0}.

Fixes: CID 375028
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>
grub-core/loader/i386/pc/linux.c