Fix crash on 'info vnc' after 'change vnc none'
PATCH 1/1 Fix crash on 'info vnc' after 'change vnc none'
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
qemu/vnc.c 2008-11-06 14:31:51.000000000 -0800 renamed from qemu/vnc.c 2008-08-21 17:46:40.000000000 -0700 +1 -1
@@ -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: ");
Quoted 7 lines · James Ko
I propose the following patch to prevent crash in call to
term_print_filenamewith NULLvnc_state->displayargument fromdo_info_vnc.
vnc_state->displayis set to NULL after "change vnc none" butvnc_stateitself is still valid.James
Please include a Signed-off-by.
Regards,
Anthony Liguori
Quoted 14 lines
diff -aru
a/qemu/vnc.cb/qemu/vnc.cqemu/vnc.c 2008-11-06 14:31:51.000000000 -0800 renamed from qemu/vnc.c 2008-08-21 17:46:40.000000000 -0700 +1
-1@@ -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: ");
Aurelien Jarno
AppliedQuoted 9 lines · James Ko
I propose the following patch to prevent crash in call to
term_print_filename
with NULLvnc_state->displayargument fromdo_info_vnc.
vnc_state->displayis set to NULL after "change vnc none" butvnc_stateitself
is still valid.James
Thanks, applied.
Quoted 16 lines
diff -aru
a/qemu/vnc.cb/qemu/vnc.cqemu/vnc.c 2008-11-06 14:31:51.000000000 -0800 renamed from qemu/vnc.c 2008-08-21 17:46:40.000000000 -0700 +1
-1@@ -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: ");
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net