[syslinux] [PATCH] mboot: Fix lfree() of global, corrupting VBE mode info

Michael Forney mforney at mforney.org
Tue Mar 1 12:55:36 PST 2022


mi is freed at the end of this function, and is not used after this
assignment. Setting mi to the address of the global vesa_info.mi
here results in corruption of VBE info passed to the kernel.

Signed-off-by: Michael Forney <mforney at mforney.org>
---
 com32/mboot/initvesa.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/com32/mboot/initvesa.c b/com32/mboot/initvesa.c
index 9111ec27..ae7c160e 100644
--- a/com32/mboot/initvesa.c
+++ b/com32/mboot/initvesa.c
@@ -190,7 +190,6 @@ void set_graphics_mode(const struct multiboot_header *mbh,
     if (!bestpxf)
 	goto out;		/* No mode found */
 
-    mi = &vesa_info.mi;
     mode = bestmode;
 
     /* Now set video mode */
-- 
2.34.1



More information about the Syslinux mailing list