From: Paul Gofman pgofman@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57690
Fixes a regression introduced by commit de23dfc5b1eac6e111cd66540ad9a97b61a3fe28. --- dlls/ntdll/unix/thread.c | 2 +- dlls/wow64/process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index cec6b3cb106..b64a7dd40af 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2069,7 +2069,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class, { if (is_old_wow64()) { - if (is_process_wow64( &info.ClientId )) + if (info.TebBaseAddress && is_process_wow64( &info.ClientId )) info.TebBaseAddress = (char *)info.TebBaseAddress + teb_offset; else info.TebBaseAddress = NULL; diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c index 4d067cea06f..c459de16418 100644 --- a/dlls/wow64/process.c +++ b/dlls/wow64/process.c @@ -692,7 +692,7 @@ NTSTATUS WINAPI wow64_NtQueryInformationThread( UINT *args ) if (!status) { info32.ExitStatus = info.ExitStatus; - info32.TebBaseAddress = is_process_id_wow64( &info.ClientId ) ? + info32.TebBaseAddress = is_process_id_wow64( &info.ClientId ) && info.TebBaseAddress ? PtrToUlong(info.TebBaseAddress) + 0x2000 : 0; info32.ClientId.UniqueProcess = HandleToULong( info.ClientId.UniqueProcess ); info32.ClientId.UniqueThread = HandleToULong( info.ClientId.UniqueThread );