Zhiyi Zhang : msi: Pass size in bytes to RegQueryValueExW().
Alexandre Julliard
julliard at winehq.org
Tue Oct 19 16:07:46 CDT 2021
Module: wine
Branch: master
Commit: 6a6bdd2cee87bb076d57aaa013b2492d8b70506f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6a6bdd2cee87bb076d57aaa013b2492d8b70506f
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Oct 19 16:30:51 2021 +0800
msi: Pass size in bytes to RegQueryValueExW().
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/package.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 23e938f1759..7488c095080 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -527,7 +527,7 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package)
if (!RegCreateKeyExW(netsetup, L"v4\\Client", 0, NULL, 0, KEY_QUERY_VALUE, NULL, &hkey, NULL))
{
- size = ARRAY_SIZE(path);
+ size = sizeof(path);
if (!RegQueryValueExW(hkey, L"InstallPath", NULL, &type, (BYTE *)path, &size))
{
len = lstrlenW(path) + lstrlenW(L"fusion.dll") + 2;
@@ -782,12 +782,12 @@ static VOID set_installer_properties(MSIPACKAGE *package)
PathAddBackslashW( pth );
msi_set_property( package->db, L"SystemFolder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFilesFolder", pth, -1 );
@@ -806,22 +806,22 @@ static VOID set_installer_properties(MSIPACKAGE *package)
PathAddBackslashW( pth );
msi_set_property( package->db, L"SystemFolder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFiles64Folder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"ProgramFilesDir (x86)", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFiles64Folder", pth, -1 );
- len = MAX_PATH;
+ len = sizeof(pth);
RegQueryValueExW(hkey, L"CommonFilesDir (x86)", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFilesFolder", pth, -1 );
More information about the wine-cvs
mailing list