Commit c7b14235 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent d9ce24e6
......@@ -404,6 +404,8 @@ NTSTATUS WINAPI NtSetInformationProcess(
if (ProcessInformationLength != sizeof(DWORD_PTR)) return STATUS_INVALID_PARAMETER;
if (*(PDWORD_PTR)ProcessInformation & ~(((DWORD_PTR)1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1))
return STATUS_INVALID_PARAMETER;
if (!*(PDWORD_PTR)ProcessInformation)
return STATUS_INVALID_PARAMETER;
SERVER_START_REQ( set_process_info )
{
req->handle = wine_server_obj_handle( ProcessHandle );
......
......@@ -908,7 +908,6 @@ static void test_affinity(void)
proc_affinity = 0;
status = pNtSetInformationProcess( GetCurrentProcess(), ProcessAffinityMask, &proc_affinity, sizeof(proc_affinity) );
todo_wine
ok( status == STATUS_INVALID_PARAMETER,
"Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
......
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