Added patch to ignore higher bits in selector for ThreadDescriptorTableEntry info query.

This commit is contained in:
Sebastian Lackner
2015-09-13 23:06:26 +02:00
parent ff9f5115fb
commit 0a96d76b16
5 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,35 @@
From a8f0b6092f5f1a52ca87bf6fc2822fe0b4edcc84 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Sep 2015 23:03:43 +0200
Subject: ntdll: Ignore higher bits in selector for ThreadDescriptorTableEntry
info query.
---
dlls/ntdll/thread.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 0be5585..5799f27 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1062,7 +1062,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
status = STATUS_INFO_LENGTH_MISMATCH;
else if (!(tdi->Selector & 4)) /* GDT selector */
{
- unsigned sel = tdi->Selector & ~3; /* ignore RPL */
+ unsigned sel = LOWORD(tdi->Selector) & ~3; /* ignore RPL */
status = STATUS_SUCCESS;
if (!sel) /* null selector */
memset( &tdi->Entry, 0, sizeof(tdi->Entry) );
@@ -1093,7 +1093,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
SERVER_START_REQ( get_selector_entry )
{
req->handle = wine_server_obj_handle( handle );
- req->entry = tdi->Selector >> 3;
+ req->entry = LOWORD(tdi->Selector) >> 3;
status = wine_server_call( req );
if (!status)
{
--
2.5.1

View File

@ -0,0 +1 @@
Fixes: Ignore higher bits in selector for ThreadDescriptorTableEntry info query