Author: tkreuzer
Date: Sat May 17 22:30:43 2014
New Revision: 63338
URL:
http://svn.reactos.org/svn/reactos?rev=63338&view=rev
Log:
[NTOSKRNL]
Fix Mm
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] Sat May 17 22:30:43 2014
@@ -4409,13 +4409,18 @@
&StartingAddress);
}
- if (Result == TableFoundNode) goto FailPath;
+ if (Result == TableFoundNode)
+ {
+ Status = STATUS_NO_MEMORY;
+ goto FailPath;
+ }
//
// Now we know where the allocation ends. Make sure it doesn't end up
// somewhere in kernel mode.
//
- EndingAddress = ((ULONG_PTR)StartingAddress + PRegionSize - 1) | (PAGE_SIZE -
1);
+ NT_ASSERT(StartingAddress != 0);
+ EndingAddress = (StartingAddress + PRegionSize - 1) | (PAGE_SIZE - 1);
if ((PVOID)EndingAddress > MM_HIGHEST_VAD_ADDRESS)
{
Status = STATUS_NO_MEMORY;