[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH v2] block: Do not strcmp() with NULL uri->schem
From: |
Max Reitz |
Subject: |
Re: [Qemu-stable] [PATCH v2] block: Do not strcmp() with NULL uri->scheme |
Date: |
Fri, 16 Jun 2017 18:38:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 2017-06-13 22:57, 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(-)
Applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max
signature.asc
Description: OpenPGP digital signature