Dmitry Timoshkov dmitry@baikal.ru writes:
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 5ee7d0a..314813f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -563,7 +563,7 @@ static WINE_MODREF *import_dll( HMODULE module, const IMAGE_IMPORT_DESCRIPTOR *d protect_base = thunk_list; protect_size *= sizeof(*thunk_list); NtProtectVirtualMemory( NtCurrentProcess(), &protect_base,
&protect_size, PAGE_WRITECOPY, &protect_old );
&protect_size, PAGE_READWRITE, &protect_old );
Restoring the permissions is not going to work if it was already writable.