Kevin Puetz : ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
Alexandre Julliard
julliard at winehq.org
Wed Feb 5 16:53:35 CST 2020
Module: wine
Branch: master
Commit: b6e91fa44b38b5771c6c694d8f6cfa607362fb49
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b6e91fa44b38b5771c6c694d8f6cfa607362fb49
Author: Kevin Puetz <PuetzKevinA at JohnDeere.com>
Date: Wed Feb 5 20:00:44 2020 +0100
ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/loader.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index b865d4f9ed..85eb297680 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2757,7 +2757,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
/* restart with larger buffer */
}
- if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName)
+ if (!info->lpAssemblyManifestPath)
{
status = STATUS_SXS_KEY_NOT_FOUND;
goto done;
@@ -2768,7 +2768,7 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
p++;
- if (strncmpiW( p, info->lpAssemblyDirectoryName, dirlen ) || strcmpiW( p + dirlen, dotManifestW ))
+ if (!dirlen || strncmpiW( p, info->lpAssemblyDirectoryName, dirlen ) || strcmpiW( p + dirlen, dotManifestW ))
{
/* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */
@@ -2786,6 +2786,12 @@ static NTSTATUS find_actctx_dll( LPCWSTR libname, LPWSTR *fullname )
}
}
+ if (!info->lpAssemblyDirectoryName)
+ {
+ status = STATUS_SXS_KEY_NOT_FOUND;
+ goto done;
+ }
+
needed = (strlenW(user_shared_data->NtSystemRoot) * sizeof(WCHAR) +
sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + nameW.Length + 2*sizeof(WCHAR));
More information about the wine-cvs
mailing list