Make sure the protection flags on the memory view of the PE header
match the actual mmap protection.
This commit is contained in:
parent
6d06d3b927
commit
dfe1df6408
|
@ -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++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue