[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none'
From: |
James Ko |
Subject: |
[Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none' |
Date: |
Wed, 12 Nov 2008 10:38:36 -0800 |
User-agent: |
Thunderbird 2.0.0.17 (Windows/20080914) |
I propose the following patch to prevent crash in call to term_print_filename
with NULL vnc_state->display argument from do_info_vnc.
vnc_state->display is set to NULL after "change vnc none" but vnc_state itself
is still valid.
James
diff -aru a/qemu/vnc.c b/qemu/vnc.c
--- a/qemu/vnc.c 2008-08-21 17:46:40.000000000 -0700
+++ b/qemu/vnc.c 2008-11-06 14:31:51.000000000 -0800
@@ -180,7 +180,7 @@
void do_info_vnc(void)
{
- if (vnc_state == NULL)
+ if (vnc_state == NULL || vnc_state->display == NULL)
term_printf("VNC server disabled\n");
else {
term_printf("VNC server active on: ");
- [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none',
James Ko <=