From: James Ko <koj@cisco.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none'
Date: Wed, 12 Nov 2008 10:38:36 -0800 [thread overview]
Message-ID: <491B22AC.6050907@cisco.com> (raw)
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: ");
next reply other threads:[~2008-11-12 18:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 18:38 James Ko [this message]
2008-11-13 19:53 ` [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none' Anthony Liguori
2008-12-13 18:58 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491B22AC.6050907@cisco.com \
--to=koj@cisco.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).