- Fix memory region size calculation in MemoryBasicInformation in certain cases. Spotted by Michael Martin.

svn path=/trunk/; revision=50108
This commit is contained in:
Aleksey Bragin 2010-12-22 21:59:27 +00:00
parent 70f0698953
commit d1d1894231

View file

@ -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;
}
}