Do not leave not initialized fields in the structure passed to

ShellExecuteExW32.
oldstable
Dmitry Timoshkov 2004-02-12 20:04:23 +00:00 committed by Alexandre Julliard
parent ccc57b323d
commit 9fd0183c27
1 changed files with 4 additions and 11 deletions

View File

@ -632,17 +632,10 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
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;