From 9fd0183c27bfd954d6d8b6b4b99d84d32b142b23 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 12 Feb 2004 20:04:23 +0000 Subject: [PATCH] Do not leave not initialized fields in the structure passed to ShellExecuteExW32. --- dlls/shell32/shell.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c index 6cbb985786e..4b755f6f582 100644 --- a/dlls/shell32/shell.c +++ b/dlls/shell32/shell.c @@ -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; -- 2.11.4.GIT