summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/regactivex/regactivex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'setup_native/source/win32/customactions/regactivex/regactivex.cxx')
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index 293a8c8a4111..f7234a4725c8 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -23,6 +23,7 @@
#include <windows.h>
#include <msiquery.h>
+#include <cassert>
#include <string.h>
#include <malloc.h>
@@ -66,6 +67,7 @@ static void RegisterActiveXNative( const wchar_t* pActiveXPath, int nMode, BOOL
if ( nLen > nRemoveLen )
{
wchar_t* pProgramPath = static_cast<wchar_t*>( malloc( (nLen - nRemoveLen + 1) * sizeof(wchar_t) ) );
+ assert(pProgramPath); // Don't handle OOM conditions
wcsncpy( pProgramPath, pActiveXPath, nLen - nRemoveLen );
pProgramPath[ nLen - nRemoveLen ] = 0;
@@ -102,6 +104,7 @@ static BOOL GetMsiPropW( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppV
sz++;
DWORD nbytes = sz * sizeof( wchar_t );
wchar_t* buff = static_cast<wchar_t*>( malloc( nbytes ) );
+ assert(buff); // Don't handle OOM conditions
ZeroMemory( buff, nbytes );
MsiGetPropertyW( hMSI, pPropName, buff, &sz );
*ppValue = buff;