* [Qemu-devel] [PATCH] Fix segfault on screendump with -nographic
@ 2011-05-26 19:56 Alexander Graf
0 siblings, 0 replies; only message in thread
From: Alexander Graf @ 2011-05-26 19:56 UTC (permalink / raw)
To: qemu-devel@nongnu.org Developers
When running -nographic and calling "screendump" on the monitor, qemu
segfaults. Fix the invalid pointer dereference by checking for NULL.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
console.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/console.c b/console.c
index 871c1d4..9c6addf 100644
--- a/console.c
+++ b/console.c
@@ -180,7 +180,7 @@ void vga_hw_screen_dump(const char *filename)
active_console = consoles[0];
/* There is currently no way of specifying which screen we want to dump,
so always dump the first one. */
- if (consoles[0]->hw_screen_dump)
+ if (consoles[0] && consoles[0]->hw_screen_dump)
consoles[0]->hw_screen_dump(consoles[0]->hw, filename);
active_console = previous_active_console;
}
--
1.6.0.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-28 0:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 19:56 [Qemu-devel] [PATCH] Fix segfault on screendump with -nographic Alexander Graf
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).