qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] block/vmdk: Report failures in vmdk_read_cid()


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH] block/vmdk: Report failures in vmdk_read_cid()
Date: Thu, 13 Jul 2017 14:09:21 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 10.07.2017 um 03:58 hat Fam Zheng geschrieben:
> On Sun, 07/09 18:06, Peter Maydell wrote:
> > The function vmdk_read_cid() can fail if the read on the underlying
> > block device fails, or if there's a format error in the VMDK file.
> > However its API doesn't provide a mechanism to report these errors,
> > and in some cases we were returning a CID of 0 and in some cases a
> > CID of 0xffffffff, either of which might potentially be valid values.
> > 
> > Change the function to return 0 on success or a negative errno, and
> > return the CID via a uint32_t* argument. Update the callsites to
> > handle and propagate the error appropriately.
> > 
> > This fixes in passing a Coverity-spotted issue (CID 1350038) where
> > we weren't checking the return value from sscanf().
> > 
> > Signed-off-by: Peter Maydell <address@hidden>
> 
> Reviewed-by: Fam Zheng <address@hidden>

Thanks, applied to the block branch.

Kevin



reply via email to

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