Commit 6a6bdd2c authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

msi: Pass size in bytes to RegQueryValueExW().

parent 8b64f0a4
...@@ -527,7 +527,7 @@ static LPWSTR get_fusion_filename(MSIPACKAGE *package) ...@@ -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)) 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)) if (!RegQueryValueExW(hkey, L"InstallPath", NULL, &type, (BYTE *)path, &size))
{ {
len = lstrlenW(path) + lstrlenW(L"fusion.dll") + 2; len = lstrlenW(path) + lstrlenW(L"fusion.dll") + 2;
...@@ -782,12 +782,12 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -782,12 +782,12 @@ static VOID set_installer_properties(MSIPACKAGE *package)
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"SystemFolder", pth, -1 ); msi_set_property( package->db, L"SystemFolder", pth, -1 );
len = MAX_PATH; len = sizeof(pth);
RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len); RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 ); msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 );
len = MAX_PATH; len = sizeof(pth);
RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len); RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFilesFolder", pth, -1 ); msi_set_property( package->db, L"CommonFilesFolder", pth, -1 );
...@@ -806,22 +806,22 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -806,22 +806,22 @@ static VOID set_installer_properties(MSIPACKAGE *package)
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"SystemFolder", pth, -1 ); msi_set_property( package->db, L"SystemFolder", pth, -1 );
len = MAX_PATH; len = sizeof(pth);
RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len); RegQueryValueExW(hkey, L"ProgramFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFiles64Folder", pth, -1 ); 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); RegQueryValueExW(hkey, L"ProgramFilesDir (x86)", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 ); msi_set_property( package->db, L"ProgramFilesFolder", pth, -1 );
len = MAX_PATH; len = sizeof(pth);
RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len); RegQueryValueExW(hkey, L"CommonFilesDir", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFiles64Folder", pth, -1 ); 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); RegQueryValueExW(hkey, L"CommonFilesDir (x86)", 0, &type, (BYTE *)pth, &len);
PathAddBackslashW( pth ); PathAddBackslashW( pth );
msi_set_property( package->db, L"CommonFilesFolder", pth, -1 ); msi_set_property( package->db, L"CommonFilesFolder", pth, -1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment