From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] vmdk: refuse to open higher version than supported
Date: Mon, 10 Jun 2013 11:09:04 +0200 [thread overview]
Message-ID: <20130610090904.GA5745@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1370742255-16400-1-git-send-email-famz@redhat.com>
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 <famz@redhat.com>
> ---
> 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 <stefanha@redhat.com>
next prev parent reply other threads:[~2013-06-10 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 1:44 [Qemu-devel] [PATCH] vmdk: refuse to open higher version than supported Fam Zheng
2013-06-10 9:09 ` Stefan Hajnoczi [this message]
2013-06-10 9:09 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130610090904.GA5745@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).