From: Yuxuan Shui <yshui(a)codeweavers.com> Fix out-of-bound access by wcslen. Found by ASan. --- dlls/mscoree/metahost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index e1dd00656e9..0a5de313a83 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -791,7 +791,7 @@ static BOOL get_mono_path_registry(LPWSTR path) static BOOL get_mono_path_dos(const WCHAR *dir, LPWSTR path) { - static const WCHAR unix_prefix[] = {'\\','\\','?','\\','u','n','i','x','\\'}; + static const WCHAR unix_prefix[] = {'\\','\\','?','\\','u','n','i','x','\\',0}; static const WCHAR basedir[] = L"\\wine-mono-" WINE_MONO_VERSION; LPWSTR dos_dir; WCHAR mono_dll_path[MAX_PATH]; @@ -842,7 +842,7 @@ static BOOL get_mono_path_datadir(LPWSTR path) { static const WCHAR winedatadirW[] = {'W','I','N','E','D','A','T','A','D','I','R',0}; static const WCHAR winebuilddirW[] = {'W','I','N','E','B','U','I','L','D','D','I','R',0}; - static const WCHAR unix_prefix[] = {'\\','?','?','\\','u','n','i','x','\\'}; + static const WCHAR unix_prefix[] = {'\\','?','?','\\','u','n','i','x','\\',0}; static const WCHAR monoW[] = {'\\','m','o','n','o',0}; static const WCHAR dotdotmonoW[] = {'\\','.','.','\\','m','o','n','o',0}; const WCHAR *data_dir, *suffix; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8125