qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1.1] vga: Initialise VRAM with 0
@ 2012-05-23 20:54 Stefan Weil
  2012-05-24 11:18 ` Stefano Stabellini
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2012-05-23 20:54 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel

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 <sw@weilnetz.de>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-24 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-23 20:54 [Qemu-devel] [PATCH 1.1] vga: Initialise VRAM with 0 Stefan Weil
2012-05-24 11:18 ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).