aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-22 15:57:46 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-23 16:20:41 +0100
commit9ffa82aeb7181e3e85ecbbaf101fefb13b7b326a (patch)
tree04d68c74f94258a88b41cfe4d0dbaa0339a2760b
parentb7ca035baabfd8602ebe6ff3ac05ec10ce51a2ff (diff)
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 <peter.maydell@linaro.org>
-rw-r--r--hw/display/goldfish_fb.c1
1 files changed, 1 insertions, 0 deletions
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