Author: akhaldi Date: Sun Mar 5 20:45:25 2017 New Revision: 74087
URL: http://svn.reactos.org/svn/reactos?rev=74087&view=rev Log: [MSI] Sync with Wine Staging 2.2. CORE-12823
fe50dbf msi: Do not sign extend after multiplying. c659222 msi: Fix some spec file entries. 167de42 msi: Make reg_get_{multi}sz() static. f5e4dad msi: Fix handling of NULL buffer in MsiGetProductPropertyW() (Coverity). 3b5b3ef msi: Fix MSIREG_OpenUserComponentsKey and MSIREG_DeleteUpgradeCodesKey for Wow64. 5ac0242 msi: Correctly size packagecode as it's an unsquashed guid.
Modified: trunk/reactos/dll/win32/msi/dialog.c trunk/reactos/dll/win32/msi/msi.c trunk/reactos/dll/win32/msi/msi.spec trunk/reactos/dll/win32/msi/registry.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/msi/dialog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/dialog.c?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/dialog.c [iso-8859-1] Sun Mar 5 20:45:25 2017 @@ -3165,13 +3165,13 @@ MSICOSTTREE_SELFONLY, INSTALLSTATE_LOCAL, &each_cost))) { /* each_cost is in 512-byte units */ - total_cost += each_cost * 512; + total_cost += ((LONGLONG)each_cost) * 512; } if (ERROR_SUCCESS == (MSI_GetFeatureCost(dialog->package, feature, MSICOSTTREE_SELFONLY, INSTALLSTATE_ABSENT, &each_cost))) { /* each_cost is in 512-byte units */ - total_cost -= each_cost * 512; + total_cost -= ((LONGLONG)each_cost) * 512; } } return total_cost;
Modified: trunk/reactos/dll/win32/msi/msi.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.c?rev=740... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.c [iso-8859-1] Sun Mar 5 20:45:25 2017 @@ -1084,7 +1084,7 @@ MSIINSTALLCONTEXT context = MSIINSTALLCONTEXT_USERUNMANAGED; UINT r = ERROR_UNKNOWN_PROPERTY; HKEY prodkey, userdata, source; - WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], packagecode[SQUASHED_GUID_SIZE]; + WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], packagecode[GUID_SIZE]; BOOL badconfig = FALSE; LONG res; DWORD type = REG_NONE; @@ -2690,16 +2690,16 @@
if (lstrlenW(val) >= *pccbValue) { - lstrcpynW(szValue, val, *pccbValue); - *pccbValue = lstrlenW(val); + if (szValue) lstrcpynW(szValue, val, *pccbValue); r = ERROR_MORE_DATA; } else { - lstrcpyW(szValue, val); - *pccbValue = lstrlenW(val); + if (szValue) lstrcpyW(szValue, val); r = ERROR_SUCCESS; } + + *pccbValue = lstrlenW(val);
done: if (view) @@ -3326,7 +3326,7 @@ return MsiUseFeatureExA(szProduct, szFeature, 0, 0); }
-WCHAR *reg_get_multisz( HKEY hkey, const WCHAR *name ) +static WCHAR *reg_get_multisz( HKEY hkey, const WCHAR *name ) { WCHAR *ret; DWORD len, type; @@ -3335,7 +3335,7 @@ return ret; }
-WCHAR *reg_get_sz( HKEY hkey, const WCHAR *name ) +static WCHAR *reg_get_sz( HKEY hkey, const WCHAR *name ) { WCHAR *ret; DWORD len, type;
Modified: trunk/reactos/dll/win32/msi/msi.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/msi.spec?rev=... ============================================================================== --- trunk/reactos/dll/win32/msi/msi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/msi.spec [iso-8859-1] Sun Mar 5 20:45:25 2017 @@ -7,7 +7,7 @@ 11 stdcall MsiConfigureFeatureA(str str long) 12 stub MsiConfigureFeatureFromDescriptorA 13 stub MsiConfigureFeatureFromDescriptorW -14 stdcall MsiConfigureFeatureW(wstr wstr ptr) +14 stdcall MsiConfigureFeatureW(wstr wstr long) 15 stdcall MsiConfigureProductA(str long long) 16 stdcall MsiConfigureProductW(wstr long long) 17 stdcall MsiCreateRecord(long) @@ -60,10 +60,10 @@ 64 stdcall MsiGetMode(long long) 65 stdcall MsiGetProductCodeA(str str) 66 stdcall MsiGetProductCodeW(wstr wstr) -67 stdcall MsiGetProductInfoA(str str ptr long) +67 stdcall MsiGetProductInfoA(str str ptr ptr) 68 stub MsiGetProductInfoFromScriptA 69 stub MsiGetProductInfoFromScriptW -70 stdcall MsiGetProductInfoW(wstr wstr ptr long) +70 stdcall MsiGetProductInfoW(wstr wstr ptr ptr) 71 stdcall MsiGetProductPropertyA(long str ptr ptr) 72 stdcall MsiGetProductPropertyW(long wstr ptr ptr) 73 stdcall MsiGetPropertyA(ptr str ptr ptr) @@ -82,8 +82,8 @@ 86 stub MsiInstallMissingFileW 87 stdcall MsiInstallProductA(str str) 88 stdcall MsiInstallProductW(wstr wstr) -89 stdcall MsiLocateComponentA(str ptr long) -90 stdcall MsiLocateComponentW(wstr ptr long) +89 stdcall MsiLocateComponentA(str ptr ptr) +90 stdcall MsiLocateComponentW(wstr ptr ptr) 91 stdcall MsiOpenDatabaseA(str str ptr) 92 stdcall MsiOpenDatabaseW(wstr wstr ptr) 93 stdcall MsiOpenPackageA(str ptr)
Modified: trunk/reactos/dll/win32/msi/registry.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msi/registry.c?re... ============================================================================== --- trunk/reactos/dll/win32/msi/registry.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msi/registry.c [iso-8859-1] Sun Mar 5 20:45:25 2017 @@ -637,6 +637,7 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY *key, BOOL create) { WCHAR squashed_cc[SQUASHED_GUID_SIZE], keypath[0x200]; + REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS; UINT ret;
if (!squash_guid( szComponent, squashed_cc)) return ERROR_FUNCTION_FAILED; @@ -651,7 +652,7 @@
strcpyW(keypath, szInstaller_Components); strcatW( keypath, squashed_cc ); - return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); + return RegOpenKeyExW( HKEY_LOCAL_MACHINE, keypath, 0, access, key ); }
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create) @@ -926,14 +927,18 @@
UINT MSIREG_DeleteUpgradeCodesKey( const WCHAR *code ) { - WCHAR squashed_code[SQUASHED_GUID_SIZE], keypath[0x200]; + WCHAR squashed_code[SQUASHED_GUID_SIZE]; + REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS; + HKEY hkey; + LONG ret;
if (!squash_guid( code, squashed_code )) return ERROR_FUNCTION_FAILED; TRACE( "%s squashed %s\n", debugstr_w(code), debugstr_w(squashed_code) );
- strcpyW( keypath, szInstaller_UpgradeCodes ); - strcatW( keypath, squashed_code ); - return RegDeleteTreeW( HKEY_LOCAL_MACHINE, keypath ); + if (RegOpenKeyExW( HKEY_LOCAL_MACHINE, szInstaller_UpgradeCodes, 0, access, &hkey )) return ERROR_SUCCESS; + ret = RegDeleteTreeW( hkey, squashed_code ); + RegCloseKey( hkey ); + return ret; }
UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=7... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Mar 5 20:45:25 2017 @@ -112,7 +112,7 @@ reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.11 reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55 reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55 -reactos/dll/win32/msi # Synced to WineStaging-1.9.23 +reactos/dll/win32/msi # Synced to WineStaging-2.2 reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11 reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23 reactos/dll/win32/msisip # Synced to WineStaging-1.9.11