Kevin Puetz : kernelbase: Allow NULL lpAssemblyDirectoryName in find_actctx_dllpath.

Alexandre Julliard julliard at winehq.org
Wed Feb 5 16:53:35 CST 2020


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

Author: Kevin Puetz <PuetzKevinA at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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));
 




More information about the wine-cvs mailing list