From 41ea67d64db2cd93140bf16b1839fd57e6995cd6 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 2 Aug 2015 09:15:39 +0000 Subject: [PATCH] [NTOS:MM] - Don't accept 64 bit PE files on x86 (will cause use of uninitialized variable ImageBase). CORE-9955 - Remove a pointless check in MmMapViewOfSection svn path=/trunk/; revision=68593 --- reactos/ntoskrnl/mm/section.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 6b9086b5976..b1d018a09c5 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -363,7 +363,9 @@ l_ReadHeaderFromFile: switch(piohOptHeader->Magic) { case IMAGE_NT_OPTIONAL_HDR32_MAGIC: +#ifdef _WIN64 case IMAGE_NT_OPTIONAL_HDR64_MAGIC: +#endif // _WIN64 break; default: @@ -4611,13 +4613,6 @@ MmMapViewOfSection(IN PVOID SectionObject, return STATUS_SECTION_PROTECTION; } - if (ViewSize == NULL) - { - /* Following this pointer would lead to us to the dark side */ - /* What to do? Bugcheck? Return status? Do the mambo? */ - KeBugCheck(MEMORY_MANAGEMENT); - } - if (SectionOffset == NULL) { ViewOffset = 0;