In the function grub_linux16_boot(), struct grub_relocator16_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 375028 Signed-off-by: Alec Brown <alec.r.br...@oracle.com> --- grub-core/loader/i386/pc/linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/i386/pc/linux.c b/grub-core/loader/i386/pc/linux.c index 2a2995201..808818d5f 100644 --- a/grub-core/loader/i386/pc/linux.c +++ b/grub-core/loader/i386/pc/linux.c @@ -55,7 +55,7 @@ static grub_err_t grub_linux16_boot (void) { grub_uint16_t segment; - struct grub_relocator16_state state; + struct grub_relocator16_state state = {}; segment = grub_linux_real_target >> 4; state.gs = state.fs = state.es = state.ds = state.ss = segment; -- 2.27.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel