https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c1eae241a7703f28a5f7c3703a0a65343ccb97e

commit 8c1eae241a7703f28a5f7c3703a0a65343ccb97e
Author:     winesync <[email protected]>
AuthorDate: Sun Mar 13 23:59:51 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Sun Mar 20 19:28:41 2022 +0100

    [WINESYNC] msi: Pass size in bytes to RegQueryValueExW().
    
    Signed-off-by: Zhiyi Zhang <[email protected]>
    Signed-off-by: Hans Leidekker <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 6a6bdd2cee87bb076d57aaa013b2492d8b70506f by Zhiyi Zhang 
<[email protected]>
---
 dll/win32/msi/package.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dll/win32/msi/package.c b/dll/win32/msi/package.c
index 7e28e111b7b..fda1622f666 100644
--- a/dll/win32/msi/package.c
+++ b/dll/win32/msi/package.c
@@ -534,7 +534,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;
@@ -789,12 +789,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 );
@@ -813,22 +813,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 );

Reply via email to