https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8baf528d3fad6eb1f10a6…
commit 8baf528d3fad6eb1f10a6101571efb96f7540aab
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sat Mar 12 15:12:12 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:27:43 2022 +0100
[WINESYNC] msi: Check return value of GetBinaryType().
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id deb4f970009d6fd85a61d3183877e67e1ccf66fe by Zebediah Figura
<z.figura12(a)gmail.com>
---
dll/win32/msi/custom.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dll/win32/msi/custom.c b/dll/win32/msi/custom.c
index 71f02bb2745..34486f949a9 100644
--- a/dll/win32/msi/custom.c
+++ b/dll/win32/msi/custom.c
@@ -586,6 +586,7 @@ static DWORD WINAPI DllThread( LPVOID arg )
void *cookie;
BOOL wow64;
DWORD arch;
+ BOOL ret;
DWORD rc;
TRACE("custom action (%x) started\n", GetCurrentThreadId() );
@@ -608,9 +609,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));