[PATCH 0/1] MR4230: shell32: Fix string size condition check (Coverity).
The issue was introduced by 68fd74e7f9bdd2310aebeb59bc86754271cdc063. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4230
From: Nikolay Sivov <nsivov(a)codeweavers.com> The issue was introduced by 68fd74e7f9bdd2310aebeb59bc86754271cdc063. --- dlls/shell32/shlexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index e0a768012e6..eb9ca4a06df 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -164,8 +164,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp case 'l': case 'L': if (lpFile) { - if ((size = SearchPathW(NULL, lpFile, L".exe", ARRAY_SIZE(xlpFile), xlpFile, NULL) - && size <= ARRAY_SIZE(xlpFile))) + size = SearchPathW(NULL, lpFile, L".exe", ARRAY_SIZE(xlpFile), xlpFile, NULL); + if (size && size <= ARRAY_SIZE(xlpFile)) cmd = xlpFile; else cmd = lpFile; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4230
Yeah, sorry, I misplaced the brackets in the original commit which opens the way to warnings. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4230#note_50361
This merge request was approved by Paul Gofman. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4230
participants (3)
-
Nikolay Sivov -
Nikolay Sivov (@nsivov) -
Paul Gofman (@gofman)