qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vmdk: refuse to open higher version than suppor


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] vmdk: refuse to open higher version than supported
Date: Mon, 10 Jun 2013 11:09:04 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Jun 09, 2013 at 09:44:15AM +0800, Fam Zheng wrote:
> Although we try to be compatible with published VMDK spec, VMware has
> newer version from ESXi 5.1 exported OVF/OVA, which we have no knowledge
> what's changed in it. And it is very likely to have more new versions in
> the future, so it's not safe to open them blindly.

The best I could find was this high-level overview:
http://myvirtualcloud.net/?p=3829

> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block/vmdk.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/block/vmdk.c b/block/vmdk.c
> index 608daaf..d9c2368 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -558,6 +558,10 @@ static int vmdk_open_vmdk4(BlockDriverState *bs,
>          header = footer.header;
>      }
>  
> +    if (le32_to_cpu(header.version) >= 3) {
> +        return -EINVAL;
> +    }
> +

Looks fine, the VMDK 5.0 spec says header.version may be 1 or 2.

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

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