mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
[NTOS:PS] Fix size handling in ProcessDeviceMap
If you want to know the details, browse history or use git blame.
This commit is contained in:
parent
895dccd4ac
commit
d74037b666
1 changed files with 2 additions and 7 deletions
|
@ -564,12 +564,6 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||||
/* DOS Device Map */
|
/* DOS Device Map */
|
||||||
case ProcessDeviceMap:
|
case ProcessDeviceMap:
|
||||||
|
|
||||||
if (ProcessInformationLength < sizeof(PROCESS_DEVICEMAP_INFORMATION))
|
|
||||||
{
|
|
||||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ProcessInformationLength == sizeof(PROCESS_DEVICEMAP_INFORMATION_EX))
|
if (ProcessInformationLength == sizeof(PROCESS_DEVICEMAP_INFORMATION_EX))
|
||||||
{
|
{
|
||||||
/* Protect read in SEH */
|
/* Protect read in SEH */
|
||||||
|
@ -601,7 +595,8 @@ NtQueryInformationProcess(IN HANDLE ProcessHandle,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ProcessInformationLength != sizeof(PROCESS_DEVICEMAP_INFORMATION))
|
/* This has to be the size of the Query union field for x64 compatibility! */
|
||||||
|
if (ProcessInformationLength != RTL_FIELD_SIZE(PROCESS_DEVICEMAP_INFORMATION, Query))
|
||||||
{
|
{
|
||||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue