Make sure the protection flags on the memory view of the PE header

match the actual mmap protection.
This commit is contained in:
Alexandre Julliard 2003-11-11 22:06:59 +00:00
parent 6d06d3b927
commit dfe1df6408

View file

@ -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++)
{