mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 19:11:16 +00:00
[NTOSKRNL]
Fix Mm svn path=/trunk/; revision=63338
This commit is contained in:
parent
22679f9a7c
commit
5e5f4c1d14
|
@ -4409,13 +4409,18 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
||||||
&StartingAddress);
|
&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
|
// Now we know where the allocation ends. Make sure it doesn't end up
|
||||||
// somewhere in kernel mode.
|
// 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)
|
if ((PVOID)EndingAddress > MM_HIGHEST_VAD_ADDRESS)
|
||||||
{
|
{
|
||||||
Status = STATUS_NO_MEMORY;
|
Status = STATUS_NO_MEMORY;
|
||||||
|
|
Loading…
Reference in a new issue