From 26f4ff1a389a7f38fcd29c25cea297efa8315795 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 8 Nov 2011 17:09:17 +0800 Subject: [PATCH] ntdll: Use PAGE_EXECUTE_READWRITE protection when allocating stubs. --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 314813f955e..311fd38c237 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -242,7 +242,7 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) { SIZE_T size = MAX_SIZE; if (NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&stubs, 0, &size, - MEM_COMMIT, PAGE_EXECUTE_WRITECOPY ) != STATUS_SUCCESS) + MEM_COMMIT, PAGE_EXECUTE_READWRITE ) != STATUS_SUCCESS) return 0xdeadbeef; } stub = &stubs[nb_stubs++];