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

This commit is contained in:
Juan Lang 2009-09-28 08:25:16 -07:00 committed by Alexandre Julliard
parent c7b1423521
commit 2e92c726aa
2 changed files with 1 additions and 1 deletions

View File

@ -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);

View File

@ -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 );