ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Kevin Puetz 2020-02-05 20:00:44 +01:00 committed by Alexandre Julliard
parent d724f5e38c
commit b6e91fa44b
1 changed files with 8 additions and 2 deletions

View File

@ -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));