From 9ffa82aeb7181e3e85ecbbaf101fefb13b7b326a Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sun, 22 Jun 2014 15:57:46 +0100 Subject: goldfish_fb: Don't use uninitialized ymin if screen is blank Initialize ymin in the code path taken if the screen is blank, to avoid use of an uninitialized variable. Signed-off-by: Peter Maydell --- hw/display/goldfish_fb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/goldfish_fb.c b/hw/display/goldfish_fb.c index 190f0b3ee9..bdd8987714 100644 --- a/hw/display/goldfish_fb.c +++ b/hw/display/goldfish_fb.c @@ -206,6 +206,7 @@ static void goldfish_fb_update_display(void *opaque) { void *dst_line = surface_data(ds); memset( dst_line, 0, height*pitch ); + ymin = 0; ymax = height-1; } else -- cgit v1.2.3