ntdll: Handle invalid pointers in NtQueryInformationProcess(ProcessDebugObjectHandle).

This commit is contained in:
Andrey Turkin 2009-10-06 13:34:21 +04:00 committed by Alexandre Julliard
parent 29af4f9fa8
commit f2432a8bc2
1 changed files with 8 additions and 1 deletions

View File

@ -304,7 +304,14 @@ NTSTATUS WINAPI NtQueryInformationProcess(
* set it to 0 aka "no debugger" to satisfy copy protections */
len = sizeof(HANDLE);
if (ProcessInformationLength == len)
memset(ProcessInformation, 0, ProcessInformationLength);
{
if (!ProcessInformation)
ret = STATUS_ACCESS_VIOLATION;
else if (!ProcessHandle)
ret = STATUS_INVALID_HANDLE;
else
memset(ProcessInformation, 0, ProcessInformationLength);
}
else
ret = STATUS_INFO_LENGTH_MISMATCH;
break;