Commit b064d32c authored by Kevin Puetz's avatar Kevin Puetz Committed by Alexandre Julliard

kernelbase: Allow NULL lpAssemblyDirectoryName in find_actctx_dllpath.

parent b6e91fa4
...@@ -177,7 +177,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) ...@@ -177,7 +177,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path )
/* restart with larger buffer */ /* restart with larger buffer */
} }
if (!info->lpAssemblyManifestPath || !info->lpAssemblyDirectoryName) if (!info->lpAssemblyManifestPath)
{ {
status = STATUS_SXS_KEY_NOT_FOUND; status = STATUS_SXS_KEY_NOT_FOUND;
goto done; goto done;
...@@ -188,7 +188,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) ...@@ -188,7 +188,7 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path )
DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR); DWORD dirlen = info->ulAssemblyDirectoryNameLength / sizeof(WCHAR);
p++; 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 /* manifest name does not match directory name, so it's not a global
* windows/winsxs manifest; use the manifest directory name instead */ * windows/winsxs manifest; use the manifest directory name instead */
...@@ -205,6 +205,12 @@ static NTSTATUS find_actctx_dllpath( const WCHAR *name, WCHAR **path ) ...@@ -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) + needed = (lstrlenW( windows_dir ) * sizeof(WCHAR) +
sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + 2*sizeof(WCHAR)); sizeof(winsxsW) + info->ulAssemblyDirectoryNameLength + 2*sizeof(WCHAR));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment