Make sure the protection flags on the memory view of the PE header match the actual mmap protection.
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index ebaca5e..563e6d2 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c
@@ -738,6 +738,7 @@ /* set the image protections */ + VIRTUAL_SetProt( view, ptr, header_size, VPROT_COMMITTED | VPROT_READ ); sec = (IMAGE_SECTION_HEADER*)((char *)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader); for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++) {