Skip to content

Commit

Permalink
msi: Check return value of GetBinaryType().
Browse files Browse the repository at this point in the history
Signed-off-by: Zebediah Figura <[email protected]>
Signed-off-by: Hans Leidekker <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
zfigura authored and julliard committed May 4, 2018
1 parent b8c27cc commit deb4f97
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dlls/msi/custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand All @@ -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));
Expand Down

0 comments on commit deb4f97

Please sign in to comment.