[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] block/vhdx: check error return of bdrv_getl
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] block/vhdx: check error return of bdrv_getlength() |
Date: |
Mon, 7 Aug 2017 06:25:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/06/2017 10:08 PM, Jeff Cody wrote:
> Calls to bdrv_getlength() were not checking for error. In vhdx.c, this
> can lead to truncating an image file, so it is a definite bug. In
> vhdx-log.c, the path for improper behavior is less clear, but it is best
> to check in any case.
>
> Reported-by: Markus Armbruster <address@hidden>
> Signed-off-by: Jeff Cody <address@hidden>
> ---
> block/vhdx-log.c | 20 ++++++++++++++++----
> block/vhdx.c | 9 ++++++++-
> 2 files changed, 24 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature