diff options
author | Pavel Borzenkov <pavel.borzenkov@gmail.com> | 2011-10-18 21:19:03 +0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-10-26 13:36:35 +0100 |
commit | 5fc0bb4ba65c48b08a6656fc4107c112c3551a9f (patch) | |
tree | e87e4c4c276f794838a7c219ffad6dd8ba798557 /block | |
parent | 628b63fb626bcf9f6a2ad09b712f1e67015e53a8 (diff) | |
download | qemu-5fc0bb4ba65c48b08a6656fc4107c112c3551a9f.tar.gz qemu-5fc0bb4ba65c48b08a6656fc4107c112c3551a9f.tar.bz2 qemu-5fc0bb4ba65c48b08a6656fc4107c112c3551a9f.zip |
vmdk: vmdk_read_cid returns garbage if p_name is NULL
Spotted by Clang Analyzer
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/vmdk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index 396913166a..a75dcc2b88 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -207,7 +207,7 @@ static void vmdk_free_last_extent(BlockDriverState *bs) static uint32_t vmdk_read_cid(BlockDriverState *bs, int parent) { char desc[DESC_SIZE]; - uint32_t cid; + uint32_t cid = 0xffffffff; const char *p_name, *cid_str; size_t cid_str_size; BDRVVmdkState *s = bs->opaque; |