We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8125d0 commit 2d504b5Copy full SHA for 2d504b5
MemoryModule.c
@@ -370,6 +370,15 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
370
return NULL;
371
}
372
373
+#ifdef _WIN64
374
+ if (old_header->FileHeader.Machine == IMAGE_FILE_MACHINE_I386) {
375
+#else
376
+ if (old_header->FileHeader.Machine != IMAGE_FILE_MACHINE_I386) {
377
+#endif
378
+ SetLastError(ERROR_BAD_EXE_FORMAT);
379
+ return NULL;
380
+ }
381
+
382
// reserve memory for image of library
383
// XXX: is it correct to commit the complete memory region at once?
384
// calling DllEntry raises an exception if we don't...
0 commit comments