Commit 2e92c726 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

ntdll: Don't allow setting a zero thread affinity.

parent c7b14235
......@@ -920,7 +920,6 @@ static void test_affinity(void)
"Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
thread_affinity = 0;
status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) );
todo_wine
ok( status == STATUS_INVALID_PARAMETER,
"Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
......
......@@ -1216,6 +1216,7 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
const ULONG_PTR *paff = data;
if (length != sizeof(ULONG_PTR)) return STATUS_INVALID_PARAMETER;
if (*paff & ~affinity_mask) return STATUS_INVALID_PARAMETER;
if (!*paff) return STATUS_INVALID_PARAMETER;
SERVER_START_REQ( set_thread_info )
{
req->handle = wine_server_obj_handle( handle );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment