From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35732 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0sHZ-0000iK-AQ for qemu-devel@nongnu.org; Wed, 29 Sep 2010 04:44:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0sHX-00032k-Tf for qemu-devel@nongnu.org; Wed, 29 Sep 2010 04:44:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27331) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0sHX-00032d-N7 for qemu-devel@nongnu.org; Wed, 29 Sep 2010 04:44:55 -0400 Message-ID: <4CA2FC75.9060305@redhat.com> Date: Wed, 29 Sep 2010 10:44:37 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1284988279-8900-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1284988279-8900-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] console: Avoid dereferencing NULL active_console List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , qemu-devel@nongnu.org, Michal Suchanek On 09/20/10 15:11, Stefan Hajnoczi wrote: > The console_select() function does not check that active_console is > non-NULL before dereferencing it. When invoked with qemu -nodefaults it > is possible to hit this case. > > This patch checks that active_console is non-NULL before stashing away > the old console dimensions in console_select(). Looks sane to me, simliar tests exist in other places. Acked-by: Gerd Hoffmann cheers, Gerd