Module: wine Branch: master Commit: b064d32c525002c0e57d3ed8c3f2004ff9eff0ae URL: https://source.winehq.org/git/wine.git/?a=commit;h=b064d32c525002c0e57d3ed8c...
Author: Kevin Puetz PuetzKevinA@JohnDeere.com Date: Wed Feb 5 20:00:50 2020 +0100
kernelbase: Allow NULL lpAssemblyDirectoryName in find_actctx_dllpath.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernelbase/file.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index eeecc82d77..1a4c3aaf2e 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -177,7 +177,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) /* restart with larger buffer */ }
- if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName) + if (!info->lpAssemblyManifestPath) { status = STATUS_SXS_KEY_NOT_FOUND; goto done; @@ -188,7 +188,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
p++; - if (wcsnicmp( p, info->lpAssemblyDirectoryName, dirlen ) || wcsicmp( p + dirlen, dotManifestW )) + if (!dirlen || wcsnicmp( p, info->lpAssemblyDirectoryName, dirlen ) || wcsicmp( 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 */ @@ -205,6 +205,12 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) } }
+ if (!info->lpAssemblyDirectoryName) + { + status = STATUS_SXS_KEY_NOT_FOUND; + goto done; + } + needed = (lstrlenW( windows_dir ) * sizeof(WCHAR) + sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + 2*sizeof(WCHAR));