André Hentschel : shell32: Provide helper function a buffer of correct size.
Module: wine Branch: stable Commit: 19d469305d7e9f04859a1a4da402fc6082c5a288 URL: http://source.winehq.org/git/wine.git/?a=commit;h=19d469305d7e9f04859a1a4da4... Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed Mar 23 20:25:12 2016 +0100 shell32: Provide helper function a buffer of correct size. Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 1010372778978a30fb7f9d36d51c0cdacfb1c2c7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/shell32/shlexec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index ba83a57..23891d8 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1087,6 +1087,7 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR { UINT_PTR retval = SE_ERR_NOASSOC; WCHAR old_dir[1024]; + WCHAR res[MAX_PATH]; TRACE("File %s, Dir %s\n", debugstr_w(lpFile), debugstr_w(lpDirectory)); @@ -1100,7 +1101,10 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR SetCurrentDirectoryW(lpDirectory); } - retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, lpResult, MAX_PATH, NULL, NULL, NULL, NULL); + retval = SHELL_FindExecutable(lpDirectory, lpFile, wszOpen, res, MAX_PATH, NULL, NULL, NULL, NULL); + + if (retval > 32) + strcpyW(lpResult, res); TRACE("returning %s\n", debugstr_w(lpResult)); if (lpDirectory)
participants (1)
-
Alexandre Julliard