Skip to contentSkip to conversation

vnc: Fix fatal crash with vnc reverse mode

PATCH Applied Stefan Weil 3 participants 5 messages Feb 16, 2011 – Feb 23, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
---
 ui/vnc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
ui/vnc.c +1 -0
index da83adf..096b5f3 100644
@@ -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);
     }
 }
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 4 lines · Stefan Weil

Reverse mode is unusable:

qemu -vnc localhost:5500,reverse

Quoted 8 lines

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<[email protected]>

Nice catch!

Regards,

Anthony Liguori

Quoted 17 lines
---
  ui/vnc.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
ui/vnc.c +1 -0
index da83adf..096b5f3 100644
@@ -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);
      }
  }
#2 lore raw

Am 16.02.2011 21:16, schrieb Anthony Liguori:

Quoted 10 lines · Stefan Weil
Quoted 9 lines

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.

Quoted 8 lines
Quoted 2 lines
Cc Anthony Liguori<[email protected]>

Nice catch!

Regards,

Anthony Liguori

What now? Will the patch be committed, is there a different fix for this bug, or are you planning to remove vnc because it is unmaintained?

Stefan

#3 lore raw
Quoted 16 lines · Stefan Weil

Am 16.02.2011 21:16, schrieb Anthony Liguori:

Quoted 15 lines · Stefan Weil
Quoted 11 lines

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<[email protected]>

Nice catch!

Quoted 7 lines
Quoted 3 lines

Regards,

Anthony Liguori

What now? Will the patch be committed, is there a different fix for this bug, or are you planning to remove vnc because it is unmaintained?

Cute.

Regards,

Anthony Liguori

Quoted 3 lines

Stefan

#4 lore raw
In reply to Stefan Weil
Quoted 4 lines · Stefan Weil

Reverse mode is unusable:

qemu -vnc localhost:5500,reverse

Quoted 8 lines

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<[email protected]>

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 17 lines
---
  ui/vnc.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
ui/vnc.c +1 -0
index da83adf..096b5f3 100644
@@ -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);
      }
  }