qemu-e2k/block
Fam Zheng 03c3359dfc vmdk: Check descriptor file length when reading it
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 <famz@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Don Koch <dkoch@verizon.com>
Message-id: 1417649314-13704-5-git-send-email-famz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-12-10 10:31:21 +01:00
..
accounting.c block: do not use get_clock() 2014-12-10 10:31:13 +01:00
archipelago.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
backup.c block: let backup blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
blkdebug.c blkdebug: Simplify and improve filename generation 2014-12-10 10:31:11 +01:00
blkverify.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
block-backend.c block: Add blk_add_close_notifier() for BB 2014-12-10 10:31:12 +01:00
bochs.c
cloop.c
commit.c block: let commit blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
curl.c block/curl: Improve type safety of s->timeout. 2014-11-03 11:41:47 +00:00
dmg.c
gluster.c
iscsi.c -----BEGIN PGP SIGNATURE----- 2014-11-03 18:34:09 +00:00
linux-aio.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
Makefile.objs qemu-img: Implement commit like QMP 2014-11-03 11:41:48 +00:00
mirror.c block: let mirror blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
nbd-client.c
nbd-client.h
nbd.c nbd: Fix filename generation 2014-10-20 13:41:26 +02:00
nfs.c block/nfs: Add create_opts 2014-12-10 10:31:19 +01:00
null.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
parallels.c block/parallels: fix access to not initialized memory in catalog_bitmap 2014-11-03 09:48:41 +00:00
qapi.c block/qapi: Add cache information to query-block 2014-12-10 10:31:09 +01:00
qcow2-cache.c
qcow2-cluster.c qcow2: Prevent numerical overflow 2014-12-10 10:31:20 +01:00
qcow2-refcount.c block/qcow2: Make get_refcount() global 2014-11-03 11:41:49 +00:00
qcow2-snapshot.c qcow2: Allow "full" discard 2014-11-03 11:41:47 +00:00
qcow2.c qcow2: Respect bdrv_truncate() error 2014-12-10 10:31:20 +01:00
qcow2.h block/qcow2: Make get_refcount() global 2014-11-03 11:41:49 +00:00
qcow.c block: Eliminate BlockDriverState member device_name[] 2014-10-20 13:41:26 +02:00
qed-check.c
qed-cluster.c
qed-gencb.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
qed-l2-cache.c
qed-table.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
qed.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
qed.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
quorum.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
raw_bsd.c block: Make essential BlockDriver objects public 2014-12-10 10:31:19 +01:00
raw-aio.h block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
raw-posix.c block/raw-posix: Fix ret in raw_open_common() 2014-12-10 10:31:20 +01:00
raw-win32.c block: Make essential BlockDriver objects public 2014-12-10 10:31:19 +01:00
rbd.c rbd: Add support for bdrv_invalidate_cache 2014-11-03 09:48:41 +00:00
sheepdog.c block: Rename BlockDriverAIOCB* to BlockAIOCB* 2014-10-20 13:41:27 +02:00
snapshot.c snapshot: add bdrv_drain_all() to bdrv_snapshot_delete() to avoid concurrency problem 2014-11-03 09:48:42 +00:00
ssh.c ssh: Don't crash if either host or path is not specified. 2014-10-03 10:30:33 +01:00
stream.c block: let stream blockjob run in BDS AioContext 2014-11-03 11:41:49 +00:00
vdi.c block: remove BLOCK_OPT_NOCOW from vdi_create_opts 2014-12-10 10:31:20 +01:00
vhdx-endian.c
vhdx-log.c
vhdx.c block: Eliminate BlockDriverState member device_name[] 2014-10-20 13:41:26 +02:00
vhdx.h
vmdk.c vmdk: Check descriptor file length when reading it 2014-12-10 10:31:21 +01:00
vpc.c block: remove BLOCK_OPT_NOCOW from vpc_create_opts 2014-12-10 10:31:21 +01:00
vvfat.c block/vvfat: qcow driver may not be found 2014-12-10 10:31:19 +01:00
win32-aio.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00