Skip to content
Snippets Groups Projects
Commit 74b121a0 authored by Stefan Weil's avatar Stefan Weil Committed by Justin M. Forbes
Browse files

vnc: Fix fatal crash with vnc reverse mode


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: default avatarStefan Weil <weil@mail.berlios.de>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 8d610b6b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment