From patchwork Mon Dec 3 22:44:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 203473 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B861C2C00A8 for ; Tue, 4 Dec 2012 09:48:52 +1100 (EST) Received: from localhost ([::1]:50501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfeok-0000q7-TN for incoming@patchwork.ozlabs.org; Mon, 03 Dec 2012 17:48:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfeoQ-0000Cx-8K for qemu-devel@nongnu.org; Mon, 03 Dec 2012 17:48:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfeoO-0003L7-B9 for qemu-devel@nongnu.org; Mon, 03 Dec 2012 17:48:30 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:39276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfelB-00027X-Rx; Mon, 03 Dec 2012 17:45:09 -0500 Received: by mail-ie0-f173.google.com with SMTP id e13so4917790iej.4 for ; Mon, 03 Dec 2012 14:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=8wMjSQDsFgUvA/BLx1VQFwn3YkY6mg5JwsDMPl4/cM0=; b=jSWoJTKWlVWxYUiX/KFHAps+3dhOJc0Qpnr/zHDRutAwe2PEfXr1Xrd8z85Lw8vwWQ wDtFhKxuwBD8ceoobmpjizZf54Ixj/LF0By5QhgRw+xbkI5spwvMSLXD2CTUNJnIffDS VzdFJ8vGoj0EyfOFosmla2wZ0xd5goHf4Qinik8vVaWgzIujPSXqZG1GONlLaI1CDQXE KvEixTvbOuEaLvP5eZjDmWUG5ZvihgnwgkomLZ/5DTtoA3wg9Am9I0c+CFKr5aFzJsID PuYddhevxJr8B/IfT4KtQeLiHRuebgvC0l/hd+Rxq0RXcO0cDVE6d/8cg2/0emRZ8Mqj tNYQ== Received: by 10.50.196.133 with SMTP id im5mr595394igc.61.1354574709545; Mon, 03 Dec 2012 14:45:09 -0800 (PST) Received: from localhost ([32.97.110.59]) by mx.google.com with ESMTPS id em3sm8234647igc.7.2012.12.03.14.45.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 14:45:08 -0800 (PST) From: Michael Roth To: qemu-stable@nongnu.org Date: Mon, 3 Dec 2012 16:44:32 -0600 Message-Id: <1354574681-28954-3-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1354572547-21271-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1354572547-21271-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.223.173 Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 35/43] iscsi: fix segfault in url parsing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Lieven If an invalid URL is specified iscsi_get_error(iscsi) is called with iscsi == NULL. Signed-off-by: Peter Lieven Signed-off-by: Paolo Bonzini (cherry picked from commit 8da1e18b0cf46b6c95c88bbad1cc50d6dd1bef4b) Signed-off-by: Michael Roth --- block/iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index fb001b9..817196a 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -951,8 +951,7 @@ static int iscsi_open(BlockDriverState *bs, const char *filename, int flags) iscsi_url = iscsi_parse_full_url(iscsi, filename); if (iscsi_url == NULL) { - error_report("Failed to parse URL : %s %s", filename, - iscsi_get_error(iscsi)); + error_report("Failed to parse URL : %s", filename); ret = -EINVAL; goto out; }