diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c index 9bf9f3cd508..3e2f31ffa93 100644 --- a/ntoskrnl/mm/section.c +++ b/ntoskrnl/mm/section.c @@ -4550,11 +4550,11 @@ MmMapViewOfSection(IN PVOID SectionObject, ImageSectionObject->ImageInformation.ImageFileSize = (ULONG)ImageSize; /* Check for an illegal base address */ - if (((ImageBase + ImageSize) > (ULONG_PTR)MmHighestUserAddress) || + if (((ImageBase + ImageSize) > (ULONG_PTR)MM_HIGHEST_VAD_ADDRESS) || ((ImageBase + ImageSize) < ImageSize)) { ASSERT(*BaseAddress == NULL); - ImageBase = ALIGN_DOWN_BY((ULONG_PTR)MmHighestUserAddress - ImageSize, + ImageBase = ALIGN_DOWN_BY((ULONG_PTR)MM_HIGHEST_VAD_ADDRESS - ImageSize, MM_VIRTMEM_GRANULARITY); NotAtBase = TRUE; }