From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37753 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OER7L-0007ys-93 for qemu-devel@nongnu.org; Tue, 18 May 2010 14:02:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEQty-00059e-Kg for qemu-devel@nongnu.org; Tue, 18 May 2010 13:48:23 -0400 Received: from hall.aurel32.net ([88.191.82.174]:59773) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEQty-00059P-D3 for qemu-devel@nongnu.org; Tue, 18 May 2010 13:48:22 -0400 Date: Tue, 18 May 2010 19:48:18 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH v2] qemu-kvm: avoid strlen of NULL pointer Message-ID: <20100518174818.GC31346@ohm.aurel32.net> References: <201004121051.02057.jens@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <201004121051.02057.jens@linux.vnet.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jens Osterkamp Cc: qemu-devel@nongnu.org On Mon, Apr 12, 2010 at 10:51:01AM +0200, Jens Osterkamp wrote: > > If the user wants to create a chardev of type socket but forgets to give a > host= option, qemu_opt_get returns NULL. This NULL pointer is then fed into > strlen a few lines below without a check which results in a segfault. > This fixes it. > > Signed-off-by: Jens Osterkamp Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net