Module: wine Branch: master Commit: 0aad594d5f0d032f88ca174aa2ae56f8493b40df URL: http://source.winehq.org/git/wine.git/?a=commit;h=0aad594d5f0d032f88ca174aa2...
Author: Juan Lang juan.lang@gmail.com Date: Sun Oct 16 14:49:14 2011 -0700
shell32: Use existing buffer rather than copying, and potentially truncating, a filename prior to executing it.
---
dlls/shell32/shlexec.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index b25a04b..7fd485e 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1797,6 +1797,7 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
/* terminate previous command string after the quote character */ *end = '\0'; + lpFile = wfileName; } else { @@ -1827,12 +1828,10 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) } }
- lstrcpynW(wfileName, sei_tmp.lpFile,sizeof(wfileName)/sizeof(WCHAR)); + lpFile = sei_tmp.lpFile; } } else - lstrcpynW(wfileName, sei_tmp.lpFile,sizeof(wfileName)/sizeof(WCHAR)); - - lpFile = wfileName; + lpFile = sei_tmp.lpFile;
wcmd = wcmdBuffer; len = lstrlenW(wszApplicationName) + 1;