qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* RE: [Qemu-devel] [6336] DisplayState interface change (StefanoStabellini)
@ 2009-01-16 11:13 laurent
  2009-01-16 12:59 ` Stefano Stabellini
  0 siblings, 1 reply; 5+ messages in thread
From: laurent @ 2009-01-16 11:13 UTC (permalink / raw)
  To: qemu-devel

>Revision: 6336
>          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6336
>Author:   aliguori
>Date:     2009-01-15 22:14:11 +0000 (Thu, 15 Jan 2009)
>
>Log Message:
>-----------
>DisplayState interface change (Stefano Stabellini)

This patch breaks qemu-system-ppc:

in update_palette256(), s->rgb_to_pixel() is used unitialized.

update_palette256() is called by vga_draw_graphic() whereas s->rgb_to_pixel() is initialized later in the function.

This patch correct the problem.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>

diff --git a/hw/vga.c b/hw/vga.c
index f2d98b0..769faea 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1838,6 +1838,7 @@ static void vga_update_display(void *opaque)
             s->graphic_mode = graphic_mode;
             full_update = 1;
         }
+        s->rgb_to_pixel = rgb_to_pixel_dup_table[get_depth_index(s->ds)];
         switch(graphic_mode) {
         case GMODE_TEXT:
             vga_draw_text(s, full_update);

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

end of thread, other threads:[~2009-01-19 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 11:13 [Qemu-devel] [6336] DisplayState interface change (StefanoStabellini) laurent
2009-01-16 12:59 ` Stefano Stabellini
2009-01-16 19:13   ` Aurelien Jarno
2009-01-16 19:46   ` Aurelien Jarno
2009-01-19 11:22     ` 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).