qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@dlhnet.de>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: kwolf@redhat.com, ronnie sahlberg <ronniesahlberg@gmail.com>
Subject: [Qemu-devel] [PATCH] iscsi: fix segfault in url parsing
Date: Thu, 15 Nov 2012 15:42:06 +0100	[thread overview]
Message-ID: <50A4FF3E.4010209@dlhnet.de> (raw)

If an invalid URL is specified iscsi_get_error(iscsi) is called
with iscsi == NULL.

Signed-off-by: Peter Lieven <pl@kamp.de>
---
  block/iscsi.c |    3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/iscsi.c b/block/iscsi.c
index d0b1a10..b5c3161 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -947,8 +947,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;
      }
-- 
1.7.9.5

             reply	other threads:[~2012-11-15 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 14:42 Peter Lieven [this message]
2012-11-15 14:55 ` [Qemu-devel] [PATCH] iscsi: fix segfault in url parsing ronnie sahlberg
2012-11-15 16:00 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A4FF3E.4010209@dlhnet.de \
    --to=pl@dlhnet.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).