IN SECTION_INHERIT InheritDisposition,
IN ULONG AllocationType,
IN ULONG Protect);
-
+
//
// PeFmtCreateSection depends on the following:
//
{
DPRINT1("MmRequestPageMemoryConsumer failed (Status %x)\n", Status);
}
-
+
}
else
{
PMM_REGION Region;
ULONG Entry;
PEPROCESS Process = MmGetAddressSpaceOwner(AddressSpace);
-
+
DPRINT("MmAccessFaultSectionView(%x, %x, %x, %x)\n", AddressSpace, MemoryArea, Address, Locked);
/*
ImageSectionObject->ImageSize = (ULONG)ImageSize;
+ /* Check for an illegal base address */
+ if ((ImageBase + ImageSize) > (ULONG_PTR)MmHighestUserAddress)
+ {
+ ImageBase = PAGE_ROUND_DOWN((ULONG_PTR)MmHighestUserAddress - ImageSize);
+ }
+
/* Check there is enough space to map the section at that point. */
if (MmLocateMemoryAreaByRegion(AddressSpace, (PVOID)ImageBase,
PAGE_ROUND_UP(ImageSize)) != NULL)