=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: shell32: Provide helper function a buffer of correct size.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Mar 25 10:00:39 CDT 2016
Module: wine
Branch: master
Commit: 1010372778978a30fb7f9d36d51c0cdacfb1c2c7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1010372778978a30fb7f9d36d51c0cdacfb1c2c7
Author: André Hentschel <nerv at 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 at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at 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 5fcbe03..6aa3eec 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)
More information about the wine-cvs
mailing list