aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa/initvesa.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2006-09-30 10:56:44 -0700
committerH. Peter Anvin <hpa@zytor.com>2006-09-30 10:56:44 -0700
commit0bcf7dfe521e0d175d916446210ba6786b8bc537 (patch)
treeae7d6fa45a077eb237e22d902c7393389c51ed70 /com32/lib/sys/vesa/initvesa.c
parente573c2a208e9194cfce053adc093ddc452e0c7d7 (diff)
downloadsyslinux-0bcf7dfe521e0d175d916446210ba6786b8bc537.tar.gz
syslinux-0bcf7dfe521e0d175d916446210ba6786b8bc537.tar.xz
syslinux-0bcf7dfe521e0d175d916446210ba6786b8bc537.zip
vesainit: clear the VESA buffers before call (paranoia)
Diffstat (limited to 'com32/lib/sys/vesa/initvesa.c')
-rw-r--r--com32/lib/sys/vesa/initvesa.c2
1 files changed, 2 insertions, 0 deletions
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);