From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPiau-0002y7-OP for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:18:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPias-0002wq-4O for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:18:32 -0500 Received: from [199.232.76.173] (port=57933 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPias-0002wm-0t for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:18:30 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:36757) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPiar-00023y-Py for qemu-devel@nongnu.org; Wed, 21 Jan 2009 14:18:29 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0LJGrW0020116 for ; Wed, 21 Jan 2009 14:16:53 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0LJIQHx178826 for ; Wed, 21 Jan 2009 14:18:26 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0LJIQ6P011067 for ; Wed, 21 Jan 2009 14:18:26 -0500 Received: from squirrel.codemonkey.ws (sig-9-65-23-227.mts.ibm.com [9.65.23.227]) by d01av01.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n0LJIPwV011030 for ; Wed, 21 Jan 2009 14:18:26 -0500 Message-ID: <497774F6.5010306@us.ibm.com> Date: Wed, 21 Jan 2009 13:18:14 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] re-fix screendump References: <49776F48.2010001@eu.citrix.com> In-Reply-To: <49776F48.2010001@eu.citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Stefano Stabellini wrote: > Removing the assumption about a single graphic console made > get_graphic_console return NULL when called by vga_screen_dump. > In this case returning NULL is correct but since NULL is not handled in > qemu_console_resize it causes a segmentation fault. > Just returning immediately from qemu_console_resize is sufficient to fix the > problem. > > Signed-off-by: Stefano Stabellini > Applied. Thanks. Regards, Anthony Liguori > --- > > diff --git a/console.c b/console.c > index 6d0c1b3..9dcbac8 100644 > --- a/console.c > +++ b/console.c > @@ -1421,6 +1421,8 @@ void text_consoles_set_display(DisplayState *ds) > void qemu_console_resize(DisplayState *ds, int width, int height) > { > TextConsole *s = get_graphic_console(ds); > + if (!s) return; > + > s->g_width = width; > s->g_height = height; > if (is_graphic_console()) { > > > > > >