Alexandre Julliard : ntdll: Support a full path name in the loadFrom dll redirection entry.

Alexandre Julliard julliard at winehq.org
Wed Apr 21 15:57:52 CDT 2021


Module: wine
Branch: master
Commit: 1cf2ae1907e2e9cbaea2b1d92c9e72000bb76912
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1cf2ae1907e2e9cbaea2b1d92c9e72000bb76912

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Apr 21 08:55:38 2021 +0200

ntdll: Support a full path name in the loadFrom dll redirection entry.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50978
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/loader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 4a5422b52ac..9f614db01c5 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2451,7 +2451,8 @@ static NTSTATUS build_dlldata_path( LPCWSTR libname, ACTCTX_SECTION_KEYED_DATA *
         memcpy( p, base + dlldata->paths[i].offset, dlldata->paths[i].len );
         p += dlldata->paths[i].len / sizeof(WCHAR);
     }
-    wcscpy( p, libname );
+    if (p == buffer || p[-1] == '\\') wcscpy( p, libname );
+    else *p = 0;
 
     if (dlldata->flags & DLL_REDIRECT_PATH_EXPAND)
     {




More information about the wine-cvs mailing list