Skip to contentSkip to conversation

vmdk: vmdk_read_cid returns garbage if p_name is NULL

PATCH Applied Pavel Borzenkov 2 participants 2 messages Oct 18, 2011 – Oct 20, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmdk: vmdk_read_cid returns garbage if p_name is NULL

Spotted by Clang Analyzer

---
 block/vmdk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/vmdk.c +1 -1
index 3969131..a75dcc2 100644
@@ -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;
Signature · 1 line
1.7.0.4