mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +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
1 changed files with 8 additions and 0 deletions
|
@ -2446,6 +2446,9 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
|
||||||
/* Check if this VAD is too high */
|
/* Check if this VAD is too high */
|
||||||
if (BaseVpn < Vad->StartingVpn)
|
if (BaseVpn < Vad->StartingVpn)
|
||||||
{
|
{
|
||||||
|
/* Stop if there is no left child */
|
||||||
|
if (!Vad->LeftChild) break;
|
||||||
|
|
||||||
/* Search on the left next */
|
/* Search on the left next */
|
||||||
Vad = Vad->LeftChild;
|
Vad = Vad->LeftChild;
|
||||||
}
|
}
|
||||||
|
@ -2453,6 +2456,11 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
|
||||||
{
|
{
|
||||||
/* Then this VAD is too low, keep searching on the right */
|
/* Then this VAD is too low, keep searching on the right */
|
||||||
ASSERT(BaseVpn > Vad->EndingVpn);
|
ASSERT(BaseVpn > Vad->EndingVpn);
|
||||||
|
|
||||||
|
/* Stop if there is no right child */
|
||||||
|
if (!Vad->LeftChild) break;
|
||||||
|
|
||||||
|
/* Search on the right next */
|
||||||
Vad = Vad->RightChild;
|
Vad = Vad->RightChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue