qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] block/vpc: Add a sanity check that fixed-size images have th


From: Hanna Reitz
Subject: Re: [PATCH] block/vpc: Add a sanity check that fixed-size images have the right type
Date: Wed, 13 Oct 2021 11:52:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 12.10.21 10:27, Thomas Huth wrote:
The code in vpc.c uses BDRVVPCState->footer.type in various places
to decide whether the image is a fixed-size (VHD_FIXED) or a dynamic
(VHD_DYNAMIC) image. However, we never check that this field really
contains VHD_FIXED if we detected a fixed size image in vpc_open(),
so a wrong value here could cause quite some trouble during runtime.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
  block/vpc.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, applied to my block branch:

https://gitlab.com/hreitz/qemu/-/commits/block/

Hanna




reply via email to

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