In the function grub_xnu_boot(), struct grub_relocator32_state state is called but isn't being initialized. To prevent contents of this structure from being filled with junk data from the stack, we can initialize it to 0 by setting state to {}.
Fixes: CID 375035 Signed-off-by: Alec Brown <alec.r.br...@oracle.com> --- grub-core/loader/i386/xnu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/i386/xnu.c b/grub-core/loader/i386/xnu.c index caab5cfa6..c956942a2 100644 --- a/grub-core/loader/i386/xnu.c +++ b/grub-core/loader/i386/xnu.c @@ -960,7 +960,7 @@ grub_xnu_boot (void) grub_addr_t devtree_target; grub_size_t devtreelen; int i; - struct grub_relocator32_state state; + struct grub_relocator32_state state = {}; grub_uint64_t fsbfreq = 100000000; int v2 = (grub_xnu_darwin_version >= 11); grub_uint32_t efi_system_table = 0; -- 2.27.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel