[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic |
Date: |
Thu, 2 Jun 2011 08:33:02 +0200 |
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 <address@hidden>
---
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
- [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011, Alexander Graf, 2011/06/03
- [Qemu-devel] [PATCH 2/5] PPC: fix sregs usage on booke, Alexander Graf, 2011/06/03
- [Qemu-devel] [PATCH 3/5] PPC: install mpc8544ds.dtb, Alexander Graf, 2011/06/03
- [Qemu-devel] [PATCH 4/5] Fix segfault on screendump with -nographic,
Alexander Graf <=
- [Qemu-devel] [PATCH 1/5] ppc: Fix compilation for ppc64-softmmu, Alexander Graf, 2011/06/03
- [Qemu-devel] [PATCH 5/5] PPC: fix mpc8544ds pci default devices, Alexander Graf, 2011/06/03
- Re: [Qemu-devel] [PULL 0/5] PPC patch queue June 03 2011, Aurelien Jarno, 2011/06/03