Alexandre Julliard : ntdll: Use .so builtin if found instead of falling back to the installed PE file.
Alexandre Julliard
julliard at winehq.org
Wed Jun 19 15:08:16 CDT 2019
Module: wine
Branch: master
Commit: a226e2b7a9651f2d19a953267d3d8ff98d3783e8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a226e2b7a9651f2d19a953267d3d8ff98d3783e8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 19 11:47:34 2019 +0200
ntdll: Use .so builtin if found instead of falling back to the installed PE file.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/loader.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3d747ed..43ca7c5 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2304,6 +2304,7 @@ static NTSTATUS open_builtin_file( char *name, WINE_MODREF **pwm, void **module,
{
WARN( "%s found in WINEDLLPATH but not a builtin, ignoring\n", debugstr_a(name) );
NtUnmapViewOfSection( NtCurrentProcess(), *module );
+ *module = NULL;
status = STATUS_DLL_NOT_FOUND;
}
@@ -2318,6 +2319,8 @@ static NTSTATUS open_builtin_file( char *name, WINE_MODREF **pwm, void **module,
{
if ((*so_name = RtlAllocateHeap( GetProcessHeap(), 0, strlen(name) + 1 )))
strcpy( *so_name, name );
+ NtUnmapViewOfSection( NtCurrentProcess(), *module );
+ *module = NULL;
status = STATUS_SUCCESS;
}
else status = STATUS_IMAGE_MACHINE_TYPE_MISMATCH;
@@ -2505,7 +2508,7 @@ static NTSTATUS load_builtin_dll( LPCWSTR load_path, const UNICODE_STRING *nt_na
if (status == STATUS_DLL_NOT_FOUND && *module_ptr)
{
/* builtin not found, load the module we got previously */
- TRACE( "loading %s from PE builtin %s\n", debugstr_w(name), debugstr_us(nt_name) );
+ TRACE( "loading %s from PE file %s\n", debugstr_w(name), debugstr_us(nt_name) );
return load_native_dll( load_path, nt_name, module_ptr, &image_info, flags, pwm, &st );
}
if (status) return status;
More information about the wine-cvs
mailing list