]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vnc: Fix fatal crash with vnc reverse mode
authorStefan Weil <weil@mail.berlios.de>
Wed, 16 Feb 2011 19:48:00 +0000 (20:48 +0100)
committerJustin M. Forbes <jforbes@redhat.com>
Fri, 25 Feb 2011 16:17:07 +0000 (10:17 -0600)
Reverse mode is unusable:

qemu -vnc localhost:5500,reverse

crashes in vnc_refresh_server_surface because some pointers are NULL.

Fix this by calling vnc_dpy_resize (which initializes these pointers)
before calling vnc_refresh.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/vnc.c

index 560b98d441db263622afbbe05c3944be02a30447..f4fea04058763cd9164bf8c4790225a5a1c59af1 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2349,6 +2349,7 @@ static void vnc_init_timer(VncDisplay *vd)
     vd->timer_interval = VNC_REFRESH_INTERVAL_BASE;
     if (vd->timer == NULL && !QTAILQ_EMPTY(&vd->clients)) {
         vd->timer = qemu_new_timer(rt_clock, vnc_refresh, vd);
+        vnc_dpy_resize(vd->ds);
         vnc_refresh(vd);
     }
 }