qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Reverse VNC connections: Avoid segmentation fault.


From: Eddie Kohler
Subject: [Qemu-devel] [PATCH] Reverse VNC connections: Avoid segmentation fault.
Date: Wed, 29 Sep 2010 12:05:47 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

Hi

-vnc HOST:PORT,reverse connections are currently broken, because
vnc_refresh_server_surface is called before the guest is actually
available.  The following patch fixes reverse connections.

Eddie

>From 32fe1bc61ee9f2f1a8220642a48acb05b5be7322 Mon Sep 17 00:00:00 2001
From: Eddie Kohler <address@hidden>
Date: Wed, 29 Sep 2010 12:00:55 -0700
Subject: [PATCH] Reverse VNC connections: Avoid segmentation fault.

---
 ui/vnc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index c7a1831..8c3af8a 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2261,6 +2261,10 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
     VncState *vs;
     int has_dirty = 0;
 
+    /* On reverse connections, the guest might not be connected yet. */
+    if (!vd->guest.ds)
+       return 0;
+
     /*
      * Walk through the guest dirty map.
      * Check and copy modified bits from guest to server surface.
-- 
1.7.0.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]