Vincent Povirk : mscoree: Don' t use a shared mono install with no drive letter.
Alexandre Julliard
julliard at winehq.org
Mon Apr 8 15:12:00 CDT 2019
Module: wine
Branch: master
Commit: 30baa2a833a0bbd744425a85b6ce57529aa29b59
URL: https://source.winehq.org/git/wine.git/?a=commit;h=30baa2a833a0bbd744425a85b6ce57529aa29b59
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Mon Apr 8 11:03:56 2019 -0500
mscoree: Don't use a shared mono install with no drive letter.
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mscoree/metahost.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c
index 50d43b3..1b2abd2 100644
--- a/dlls/mscoree/metahost.c
+++ b/dlls/mscoree/metahost.c
@@ -712,6 +712,7 @@ static BOOL get_mono_path_registry(LPWSTR path)
static BOOL get_mono_path_unix(const char *unix_dir, LPWSTR path)
{
+ static const WCHAR unix_prefix[] = {'\\','\\','?','\\','u','n','i','x','\\'};
static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*);
LPWSTR dos_dir;
WCHAR mono_dll_path[MAX_PATH];
@@ -728,6 +729,13 @@ static BOOL get_mono_path_unix(const char *unix_dir, LPWSTR path)
if (!dos_dir)
return FALSE;
+ if (memcmp(dos_dir, unix_prefix, sizeof(unix_prefix)) == 0)
+ {
+ /* No drive letter for this directory */
+ heap_free(dos_dir);
+ return FALSE;
+ }
+
ret = find_mono_dll(dos_dir, mono_dll_path);
if (ret)
strcpyW(path, dos_dir);
More information about the wine-cvs
mailing list