mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:42:57 +00:00
- Add probing of the result buffers
svn path=/trunk/; revision=41464
This commit is contained in:
parent
12adb28b86
commit
8b7d2f3924
1 changed files with 19 additions and 11 deletions
|
@ -80,17 +80,25 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||||
ULONG Cookie;
|
ULONG Cookie;
|
||||||
PAGED_CODE();
|
PAGED_CODE();
|
||||||
|
|
||||||
/* Check validity of Information Class */
|
/* Check for user-mode caller */
|
||||||
#if 0
|
if (PreviousMode != KernelMode)
|
||||||
Status = DefaultQueryInfoBufferCheck(ProcessInformationClass,
|
{
|
||||||
PsProcessInfoClass,
|
/* Prepare to probe parameters */
|
||||||
RTL_NUMBER_OF(PsProcessInfoClass),
|
_SEH2_TRY
|
||||||
ProcessInformation,
|
{
|
||||||
ProcessInformationLength,
|
ProbeForWrite(ProcessInformation,
|
||||||
ReturnLength,
|
ProcessInformationLength,
|
||||||
PreviousMode);
|
sizeof(ULONG));
|
||||||
if (!NT_SUCCESS(Status)) return Status;
|
if (ReturnLength) ProbeForWriteUlong(ReturnLength);
|
||||||
#endif
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
/* Get the error code */
|
||||||
|
Status = _SEH2_GetExceptionCode();
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
|
if(!NT_SUCCESS(Status)) return Status;
|
||||||
|
}
|
||||||
|
|
||||||
if((ProcessInformationClass == ProcessCookie) &&
|
if((ProcessInformationClass == ProcessCookie) &&
|
||||||
(ProcessHandle != NtCurrentProcess()))
|
(ProcessHandle != NtCurrentProcess()))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue