From 0bcf7dfe521e0d175d916446210ba6786b8bc537 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 30 Sep 2006 10:56:44 -0700 Subject: vesainit: clear the VESA buffers before call (paranoia) --- com32/lib/sys/vesa/initvesa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com32/lib/sys/vesa/initvesa.c b/com32/lib/sys/vesa/initvesa.c index bcdcc09d..febb5804 100644 --- a/com32/lib/sys/vesa/initvesa.c +++ b/com32/lib/sys/vesa/initvesa.c @@ -105,6 +105,7 @@ static int vesacon_set_mode(void) debug("Hello, World!\r\n"); memset(&rm, 0, sizeof rm); + memset(gi, 0, sizeof *gi); gi->signature = VBE2_MAGIC; /* Get VBE2 extended data */ rm.eax.w[0] = 0x4F00; /* Get SVGA general information */ @@ -135,6 +136,7 @@ static int vesacon_set_mode(void) while ((mode = *mode_ptr++) != 0xFFFF) { debug("Found mode: 0x%04x\r\n", mode); + memset(mi, 0, sizeof *mi); rm.eax.w[0] = 0x4F01; /* Get SVGA mode information */ rm.ecx.w[0] = mode; rm.edi.w[0] = OFFS(mi); -- cgit v1.2.1