* [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none'
@ 2008-11-12 18:38 James Ko
2008-11-13 19:53 ` Anthony Liguori
2008-12-13 18:58 ` Aurelien Jarno
0 siblings, 2 replies; 3+ messages in thread
From: James Ko @ 2008-11-12 18:38 UTC (permalink / raw)
To: qemu-devel
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: ");
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none'
2008-11-12 18:38 [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none' James Ko
@ 2008-11-13 19:53 ` Anthony Liguori
2008-12-13 18:58 ` Aurelien Jarno
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-11-13 19:53 UTC (permalink / raw)
To: qemu-devel
James Ko wrote:
> 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
Please include a Signed-off-by.
Regards,
Anthony Liguori
> 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: ");
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none'
2008-11-12 18:38 [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none' James Ko
2008-11-13 19:53 ` Anthony Liguori
@ 2008-12-13 18:58 ` Aurelien Jarno
1 sibling, 0 replies; 3+ messages in thread
From: Aurelien Jarno @ 2008-12-13 18:58 UTC (permalink / raw)
To: qemu-devel
On Wed, Nov 12, 2008 at 10:38:36AM -0800, James Ko wrote:
> 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
Thanks, applied.
>
> 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: ");
>
>
>
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-13 18:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 18:38 [Qemu-devel] [PATCH] Fix crash on 'info vnc' after 'change vnc none' James Ko
2008-11-13 19:53 ` Anthony Liguori
2008-12-13 18:58 ` Aurelien Jarno
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).