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

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

View File

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

View File

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