[NTOS:MM]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 2 Aug 2015 09:15:39 +0000 (09:15 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 2 Aug 2015 09:15:39 +0000 (09:15 +0000)
- 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

index 6b9086b..b1d018a 100644 (file)
@@ -363,7 +363,9 @@ l_ReadHeaderFromFile:
     switch(piohOptHeader->Magic)
     {
     case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
     switch(piohOptHeader->Magic)
     {
     case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
+#ifdef _WIN64
     case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
     case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
+#endif // _WIN64
         break;
 
     default:
         break;
 
     default:
@@ -4611,13 +4613,6 @@ MmMapViewOfSection(IN PVOID SectionObject,
             return STATUS_SECTION_PROTECTION;
         }
 
             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;
         if (SectionOffset == NULL)
         {
             ViewOffset = 0;