[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1.1] vga: Initialise VRAM with 0
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH 1.1] vga: Initialise VRAM with 0 |
Date: |
Wed, 23 May 2012 22:54:14 +0200 |
The VNC code reads this memory before it is written by BIOS or
other code. Avoid random values by setting the VRAM to 0.
This bug was reported by Valgrind.
Signed-off-by: Stefan Weil <address@hidden>
---
hw/vga.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vga.c b/hw/vga.c
index 1469680..80b8ec3 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2283,6 +2283,7 @@ void vga_common_init(VGACommonState *s, int vga_ram_size)
s->update_retrace_info = vga_precise_update_retrace_info;
break;
}
+ memset(s->vram_ptr, 0, s->vram_size);
vga_dirty_log_start(s);
}
--
1.7.10
- [Qemu-devel] [PATCH 1.1] vga: Initialise VRAM with 0,
Stefan Weil <=