From patchwork Wed Feb 16 19:48:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 83393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CEDD1B70EE for ; Thu, 17 Feb 2011 06:50:41 +1100 (EST) Received: from localhost ([127.0.0.1]:50998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpnOX-0006Il-Q8 for incoming@patchwork.ozlabs.org; Wed, 16 Feb 2011 14:50:37 -0500 Received: from [140.186.70.92] (port=59032 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpnMF-0005nR-8d for qemu-devel@nongnu.org; Wed, 16 Feb 2011 14:48:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpnMD-0008B8-GF for qemu-devel@nongnu.org; Wed, 16 Feb 2011 14:48:15 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:59560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpnMD-00086p-2H for qemu-devel@nongnu.org; Wed, 16 Feb 2011 14:48:13 -0500 Received: from flocke.weilnetz.de (p54AD9B42.dip.t-dialin.net [84.173.155.66]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MVJte-1PZtYS0Qjm-00YjSA; Wed, 16 Feb 2011 20:48:02 +0100 Received: from stefan by flocke.weilnetz.de with local (Exim 4.72) (envelope-from ) id 1PpnM1-0004eb-18; Wed, 16 Feb 2011 20:48:01 +0100 From: Stefan Weil To: qemu-devel@nongnu.org Date: Wed, 16 Feb 2011 20:48:00 +0100 Message-Id: <1297885680-17860-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.2.3 X-Provags-ID: V02:K0:tWgHfVyo2WBRQ2JMggwtUcgPNMqlHIodVIM3B+3Rbzs wPdltE75sid6BCdq9Qe4jSKnFCAZanwQoye2byx8fqAodrzdBR p5ax18xPLiRV9i+ySbPVeNkfgjakn1bVNBDQQWDNxrvxv6hOAi /n/eEe2xrkFUIO5zMgxAF0ww1U28IemeCPsY1jLYC3WX5c+fkC OgjA1m8EvKot7/pNNZEzDUGrAPId6UHI/SEsgoQ0AOV9FzcpWd 0/zlFCcwcf0ud X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.17.8 Cc: Anthony Liguori Subject: [Qemu-devel] [PATCH] vnc: Fix fatal crash with vnc reverse mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Stefan Weil --- ui/vnc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index da83adf..096b5f3 100644 --- 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); } }