mirror of
https://github.com/reactos/reactos.git
synced 2024-08-08 04:08:29 +00:00
[NTOS]
- Fix memory region size calculation in MemoryBasicInformation in certain cases. Spotted by Michael Martin. svn path=/trunk/; revision=50108
This commit is contained in:
parent
70f0698953
commit
d1d1894231
|
@ -2446,6 +2446,9 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
|
|||
/* Check if this VAD is too high */
|
||||
if (BaseVpn < Vad->StartingVpn)
|
||||
{
|
||||
/* Stop if there is no left child */
|
||||
if (!Vad->LeftChild) break;
|
||||
|
||||
/* Search on the left next */
|
||||
Vad = Vad->LeftChild;
|
||||
}
|
||||
|
@ -2453,6 +2456,11 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
|
|||
{
|
||||
/* Then this VAD is too low, keep searching on the right */
|
||||
ASSERT(BaseVpn > Vad->EndingVpn);
|
||||
|
||||
/* Stop if there is no right child */
|
||||
if (!Vad->LeftChild) break;
|
||||
|
||||
/* Search on the right next */
|
||||
Vad = Vad->RightChild;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue