qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] re-fix screendump


From: Stefano Stabellini
Subject: [Qemu-devel] [PATCH] re-fix screendump
Date: Wed, 21 Jan 2009 18:54:00 +0000
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Removing the assumption about a single graphic console made
get_graphic_console return NULL when called by vga_screen_dump.
In this case returning NULL is correct but since NULL is not handled in
qemu_console_resize it causes a segmentation fault.
Just returning immediately from qemu_console_resize is sufficient to fix the
problem.

Signed-off-by: Stefano Stabellini <address@hidden>

---

diff --git a/console.c b/console.c
index 6d0c1b3..9dcbac8 100644
--- a/console.c
+++ b/console.c
@@ -1421,6 +1421,8 @@ void text_consoles_set_display(DisplayState *ds)
 void qemu_console_resize(DisplayState *ds, int width, int height)
 {
     TextConsole *s = get_graphic_console(ds);
+    if (!s) return;
+
     s->g_width = width;
     s->g_height = height;
     if (is_graphic_console()) {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]