Commit dfe1df64 authored by Alexandre Julliard's avatar Alexandre Julliard

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

match the actual mmap protection.
parent 6d06d3b9
...@@ -738,6 +738,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size ...@@ -738,6 +738,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, DWORD total_size
/* set the image protections */ /* set the image protections */
VIRTUAL_SetProt( view, ptr, header_size, VPROT_COMMITTED | VPROT_READ );
sec = (IMAGE_SECTION_HEADER*)((char *)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader); sec = (IMAGE_SECTION_HEADER*)((char *)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader);
for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++) for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment