From dfe1df6408d58a417252115f98b032295007f798 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 11 Nov 2003 22:06:59 +0000 Subject: [PATCH] Make sure the protection flags on the memory view of the PE header match the actual mmap protection. --- dlls/ntdll/virtual.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index ebaca5e2dd5..563e6d28c87 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -738,6 +738,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size /* 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++) {