qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH v3 1/1] block/sheepdog: fix argument passed to q


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH v3 1/1] block/sheepdog: fix argument passed to qemu_strtoul()
Date: Wed, 2 Mar 2016 17:32:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 02.03.2016 17:24, Jeff Cody wrote:
> The function qemu_strtoul() reads 'unsigned long' sized data,
> which is larger than uint32_t on 64-bit machines.
> 
> Even though the snap_id field in the header is 32-bits, we must
> accomodate the full size in qemu_strtoul().
> 
> This patch also adds more meaningful error handling to the
> qemu_strtoul() call, and subsequent results.
> 
> Reported-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
>  block/sheepdog.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Another problem with this function is that it doesn't always set errp on
error. Actually, this patch introduces the first instance where it does.

qemu-img will not print an error if errp is not set; it actually ignores
bdrv_snapshot_delete_by_id_or_name()'s return value. So this is a real
issue that should be fixed as well.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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