Re: [Qemu-devel] [PATCH v3 4/6] vmdk: Check descriptor file length when reading it

2014-12-03 Thread Fam Zheng
On Wed, 12/03 15:17, Max Reitz wrote: > On 2014-12-03 at 11:28, Fam Zheng wrote: > >Since a too small file cannot be a valid VMDK image, and also since the > >buffer's first 4 bytes will be unconditionally examined by > >vmdk_open_sparse, let's error out the small file case to be clear. > > > >Sign

Re: [Qemu-devel] [PATCH v3 4/6] vmdk: Check descriptor file length when reading it

2014-12-03 Thread Max Reitz
On 2014-12-03 at 11:28, Fam Zheng wrote: Since a too small file cannot be a valid VMDK image, and also since the buffer's first 4 bytes will be unconditionally examined by vmdk_open_sparse, let's error out the small file case to be clear. Signed-off-by: Fam Zheng Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH v3 4/6] vmdk: Check descriptor file length when reading it

2014-12-03 Thread Fam Zheng
Since a too small file cannot be a valid VMDK image, and also since the buffer's first 4 bytes will be unconditionally examined by vmdk_open_sparse, let's error out the small file case to be clear. Signed-off-by: Fam Zheng Reviewed-by: Markus Armbruster --- block/vmdk.c | 5 + 1 file change