ntdll: Use PAGE_EXECUTE_READWRITE protection when allocating stubs.

This commit is contained in:
Dmitry Timoshkov 2011-11-08 17:09:17 +08:00 committed by Alexandre Julliard
parent deaae1f562
commit 26f4ff1a38
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
{ {
SIZE_T size = MAX_SIZE; SIZE_T size = MAX_SIZE;
if (NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&stubs, 0, &size, if (NtAllocateVirtualMemory( NtCurrentProcess(), (void **)&stubs, 0, &size,
MEM_COMMIT, PAGE_EXECUTE_WRITECOPY ) != STATUS_SUCCESS) MEM_COMMIT, PAGE_EXECUTE_READWRITE ) != STATUS_SUCCESS)
return 0xdeadbeef; return 0xdeadbeef;
} }
stub = &stubs[nb_stubs++]; stub = &stubs[nb_stubs++];