[NTOS/MM] Recognize AMD64 image in PeFmtCreateSection failure case 1544/head
authorMark Jansen <mark.jansen@reactos.org>
Tue, 30 Apr 2019 17:03:17 +0000 (19:03 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Wed, 15 May 2019 17:39:56 +0000 (19:39 +0200)
ntoskrnl/mm/section.c

index 56ffab8..a8d2945 100644 (file)
@@ -364,6 +364,10 @@ l_ReadHeaderFromFile:
 #endif // _WIN64
         break;
 
+#ifndef _WIN64
+    case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
+        nStatus = STATUS_INVALID_IMAGE_WIN_64;
+#endif
     default:
         DIE(("Unrecognized optional header, Magic is %X\n", piohOptHeader->Magic));
     }