qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [Qemu-block] [PATCH v2] block: Do not strcmp() with NU


From: Stefan Hajnoczi
Subject: Re: [Qemu-stable] [Qemu-block] [PATCH v2] block: Do not strcmp() with NULL uri->scheme
Date: Thu, 15 Jun 2017 11:49:10 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

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: address@hidden
> Signed-off-by: Max Reitz <address@hidden>
> ---
> 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 <address@hidden>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]