Author: fireball
Date: Wed Dec 22 21:59:27 2010
New Revision: 50108
URL:
http://svn.reactos.org/svn/reactos?rev=50108&view=rev
Log:
[NTOS]
- Fix memory region size calculation in MemoryBasicInformation in certain cases. Spotted
by Michael Martin.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Wed Dec 22 21:59:27 2010
@@ -2446,6 +2446,9 @@
/* 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 @@
{
/* 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;
}
}