summaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/metautil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/metautil.cpp')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/metautil.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/metautil.cpp b/src/libs/dutil/WixToolset.DUtil/metautil.cpp
index f313fc1c..c36aa96c 100644
--- a/src/libs/dutil/WixToolset.DUtil/metautil.cpp
+++ b/src/libs/dutil/WixToolset.DUtil/metautil.cpp
@@ -300,7 +300,10 @@ extern "C" HRESULT DAPI MetaGetValue(
300 } 300 }
301 else // set the size of the data to the actual size of the memory 301 else // set the size of the data to the actual size of the memory
302 { 302 {
303 SIZE_T cb = MemSize(pmr->pbMDData); 303 SIZE_T cb = 0;
304 hr = MemSizeChecked(pmr->pbMDData, &cb);
305 MetaExitOnFailure(hr, "failed to get metabase size");
306
304 if (cb > DWORD_MAX) 307 if (cb > DWORD_MAX)
305 { 308 {
306 MetaExitOnRootFailure(hr = E_INVALIDSTATE, "metabase data is too large: %Iu", cb); 309 MetaExitOnRootFailure(hr = E_INVALIDSTATE, "metabase data is too large: %Iu", cb);