shell32: Minor cleanup of SHELL_execute (Clang)

Andrew Eikum aeikum at codeweavers.com
Tue Dec 22 13:08:04 CST 2015


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>

On Tue, Dec 22, 2015 at 07:30:57PM +0100, André Hentschel wrote:
> Signed-off-by: André Hentschel <nerv at dawncrow.de>
> ---
>  dlls/shell32/shlexec.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
> index ba83a57..5fcbe03 100644
> --- a/dlls/shell32/shlexec.c
> +++ b/dlls/shell32/shlexec.c
> @@ -1565,7 +1565,6 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
>      WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd;
>      DWORD dwApplicationNameLen = MAX_PATH+2;
>      DWORD parametersLen = sizeof(parametersBuffer) / sizeof(WCHAR);
> -    DWORD dirLen = sizeof(dirBuffer) / sizeof(WCHAR);
>      DWORD wcmdLen = sizeof(wcmdBuffer) / sizeof(WCHAR);
>      DWORD len;
>      SHELLEXECUTEINFOW sei_tmp;	/* modifiable copy of SHELLEXECUTEINFO struct */
> @@ -1625,11 +1624,8 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
>      if (sei_tmp.lpDirectory)
>      {
>          len = lstrlenW(sei_tmp.lpDirectory) + 1;
> -        if (len > dirLen)
> -        {
> +        if (len > sizeof(dirBuffer) / sizeof(WCHAR))
>              wszDir = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
> -            dirLen = len;
> -        }
>  	strcpyW(wszDir, sei_tmp.lpDirectory);
>      }
>      else
> -- 
> 1.9.1
> 
> 
> 
> 



More information about the wine-patches mailing list