ntdll: Allow reading from a writable section.

This commit is contained in:
André Hentschel 2011-09-06 18:00:42 +02:00 committed by Alexandre Julliard
parent ca3b1046ca
commit 8fc7419120
1 changed files with 1 additions and 1 deletions

View File

@ -1341,7 +1341,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz
size = ROUND_SIZE( sec->VirtualAddress, sec->SizeOfRawData ); size = ROUND_SIZE( sec->VirtualAddress, sec->SizeOfRawData );
if (sec->Characteristics & IMAGE_SCN_MEM_READ) vprot |= VPROT_READ; if (sec->Characteristics & IMAGE_SCN_MEM_READ) vprot |= VPROT_READ;
if (sec->Characteristics & IMAGE_SCN_MEM_WRITE) vprot |= VPROT_WRITECOPY; if (sec->Characteristics & IMAGE_SCN_MEM_WRITE) vprot |= VPROT_READ | VPROT_WRITECOPY;
if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC; if (sec->Characteristics & IMAGE_SCN_MEM_EXECUTE) vprot |= VPROT_EXEC;
/* Dumb game crack lets the AOEP point into a data section. Adjust. */ /* Dumb game crack lets the AOEP point into a data section. Adjust. */