From: Eric Pouech <epouech(a)codeweavers.com> As reported by SAST. Note: The out of bounds access is now fixed, but now SAST still reports a false positive. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- programs/cmd/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 1f613bdfc04..a446838582f 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2388,7 +2388,7 @@ RETURN_CODE WCMD_setshow_default(const WCHAR *args) change of directory, even if path was restored due to missing /D (allows changing drive letter when not resident on that drive */ - if ((string[1] == ':') && IsCharAlphaW(string[0])) { + if (IsCharAlphaW(string[0]) && string[1] == L':') { WCHAR env[4]; lstrcpyW(env, L"="); memcpy(env+1, string, 2 * sizeof(WCHAR)); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9273