All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	qemu-stable@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2] block: Do not strcmp() with NULL uri->scheme
Date: Thu, 15 Jun 2017 11:49:10 +0100	[thread overview]
Message-ID: <20170615104910.GB27346@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170613205726.13544-1-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

On Tue, Jun 13, 2017 at 10:57:26PM +0200, Max Reitz wrote:
> uri_parse(...)->scheme may be NULL. In fact, probably every field may be
> NULL, and the callers do test this for all of the other fields but not
> for scheme (except for block/gluster.c; block/vxhs.c does not access
> that field at all).
> 
> We can easily fix this by using g_strcmp0() instead of strcmp().
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
> v2:
> - Fix all affected block drivers, not just nfs [Peter]
> - Use g_strcmp0() [Markus]
> ---
>  block/nbd.c      | 6 +++---
>  block/nfs.c      | 2 +-
>  block/sheepdog.c | 6 +++---
>  block/ssh.c      | 2 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  parent reply	other threads:[~2017-06-15 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 20:57 [Qemu-devel] [PATCH v2] block: Do not strcmp() with NULL uri->scheme Max Reitz
2017-06-13 21:05 ` no-reply
2017-06-15 10:49 ` Stefan Hajnoczi [this message]
2017-06-16 16:38 ` Max Reitz

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=20170615104910.GB27346@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.