[2/3] ntdll: Use PAGE_READWRITE access when resolving DLL imports.

Alexandre Julliard julliard at winehq.org
Wed Nov 2 11:59:52 CDT 2011


Dmitry Timoshkov <dmitry at 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.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list