Zebediah Figura : msi: Check return value of GetBinaryType().

Alexandre Julliard julliard at winehq.org
Fri May 4 17:10:34 CDT 2018


Module: wine
Branch: master
Commit: deb4f970009d6fd85a61d3183877e67e1ccf66fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=deb4f970009d6fd85a61d3183877e67e1ccf66fe

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri May  4 00:32:57 2018 -0500

msi: Check return value of GetBinaryType().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msi/custom.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index ca0362b..956b3e9 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -585,6 +585,7 @@ static DWORD WINAPI DllThread( LPVOID arg )
     void *cookie;
     BOOL wow64;
     DWORD arch;
+    BOOL ret;
     DWORD rc;
 
     TRACE("custom action (%x) started\n", GetCurrentThreadId() );
@@ -607,9 +608,9 @@ static DWORD WINAPI DllThread( LPVOID arg )
     }
 
     info = find_action_by_guid(guid);
-    GetBinaryTypeW(info->source, &arch);
+    ret = GetBinaryTypeW(info->source, &arch);
 
-    if (sizeof(void *) == 8 && arch == SCS_32BIT_BINARY)
+    if (sizeof(void *) == 8 && ret && arch == SCS_32BIT_BINARY)
         GetSystemWow64DirectoryW(buffer, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR));
     else
         GetSystemDirectoryW(buffer, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR));




More information about the wine-cvs mailing list