Module: wine Branch: master Commit: eb8cac0f08312b83cf7607925ca0e5996e35499b URL: https://gitlab.winehq.org/wine/wine/-/commit/eb8cac0f08312b83cf7607925ca0e59...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Oct 30 17:30:43 2023 +0100
shell32: Fix string size condition check (Coverity).
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;