http://bugs.winehq.org/show_bug.cgi?id=5799
Summary: ntdll/virtual.c:map_image messes up section permissions when sec->Misc.VirtualSize is wrong Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-kernel AssignedTo: wine-bugs@winehq.org ReportedBy: nmiell@comcast.net
After mapping sections and performing relocations, map_image goes back to each section and sets it's image protections to their final values. When doing this, it calls VIRTUAL_SetProt with size = ROUND_SIZE( sec->VirtualAddress, sec->Misc.VirtualSize ). If sec->Misc.VirtualSize is less than sec->SizeOfRawData, this doesn't set the permissions for the entire region, leaving the permissions of the section "c-rW-". Executable sections don't get their x bit, and this breaks on systems where read doesn't imply exec.
This breaks Fallout, Fallout 2, and their respective setup programs.