mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[0.4.9][NTOS] Fix a regression in the PE loader CORE-11717
which caused images to be loaded up to MmHighestUserAddress, thus overwriting the shared user page. This is now fixed by using MM_HIGHEST_VAD_ADDRESS as the margin instead. This commit allows again to load WIN32K.sys of Win2K3SP2 which regressed by SVN 67793 == git3565260212
fix cherry picked from commit 0.4.14-dev-143-g56da95671c
This commit is contained in:
parent
995d69c8d7
commit
ca8fbad361
1 changed files with 2 additions and 2 deletions
|
@ -4556,11 +4556,11 @@ MmMapViewOfSection(IN PVOID SectionObject,
|
||||||
ImageSectionObject->ImageInformation.ImageFileSize = (ULONG)ImageSize;
|
ImageSectionObject->ImageInformation.ImageFileSize = (ULONG)ImageSize;
|
||||||
|
|
||||||
/* Check for an illegal base address */
|
/* Check for an illegal base address */
|
||||||
if (((ImageBase + ImageSize) > (ULONG_PTR)MmHighestUserAddress) ||
|
if (((ImageBase + ImageSize) > (ULONG_PTR)MM_HIGHEST_VAD_ADDRESS) ||
|
||||||
((ImageBase + ImageSize) < ImageSize))
|
((ImageBase + ImageSize) < ImageSize))
|
||||||
{
|
{
|
||||||
ASSERT(*BaseAddress == NULL);
|
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);
|
MM_VIRTMEM_GRANULARITY);
|
||||||
NotAtBase = TRUE;
|
NotAtBase = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue