From b97d63d76ff488278622f3e1ec9907519f6b8e74 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 10 Nov 2008 11:09:40 +0100 Subject: [PATCH] kernel32: Explicitly request execute permission in MapViewOfFile. --- dlls/kernel32/virtual.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c index 4db68ca7921..2b8965566da 100644 --- a/dlls/kernel32/virtual.c +++ b/dlls/kernel32/virtual.c @@ -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 ))) {