kernel32: Explicitly request execute permission in MapViewOfFile.

This commit is contained in:
Alexandre Julliard 2008-11-10 11:09:40 +01:00
parent 1ff8e7dd41
commit b97d63d76f
1 changed files with 2 additions and 0 deletions

View File

@ -543,6 +543,8 @@ LPVOID WINAPI MapViewOfFileEx( HANDLE handle, DWORD access,
else if (access & FILE_MAP_COPY) protect = PAGE_WRITECOPY;
else protect = PAGE_NOACCESS;
if (access & FILE_MAP_EXECUTE) protect <<= 4;
if ((status = NtMapViewOfSection( handle, GetCurrentProcess(), &addr, 0, 0, &offset,
&count, ViewShare, 0, protect )))
{