Do not leave not initialized fields in the structure passed to ShellExecuteExW32
Dmitry Timoshkov
dmitry at baikal.ru
Thu Feb 12 00:14:50 CST 2004
Hello,
This patch fixes a regression introduced after unicodification
of the ShellExecute interface.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Do not leave not initialized fields in the structure passed
to ShellExecuteExW32.
--- cvs/hq/wine/dlls/shell32/shell.c Fri Jan 16 17:47:25 2004
+++ wine/dlls/shell32/shell.c Thu Feb 12 13:58:17 2004
@@ -632,17 +632,10 @@ HINSTANCE16 WINAPI ShellExecute16( HWND1
WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL;
HANDLE hProcess = 0;
- if (lpOperation)
- seiW.lpVerb = __SHCloneStrAtoW(&wVerb, lpOperation);
-
- if (lpFile)
- seiW.lpFile = __SHCloneStrAtoW(&wFile, lpFile);
-
- if (lpParameters)
- seiW.lpParameters = __SHCloneStrAtoW(&wParameters, lpParameters);
-
- if (lpDirectory)
- seiW.lpDirectory = __SHCloneStrAtoW(&wDirectory, lpDirectory);
+ seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL;
+ seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL;
+ seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL;
+ seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL;
seiW.cbSize = sizeof(seiW);
seiW.fMask = 0;
More information about the wine-patches
mailing list