shell32: Use existing buffer rather than copying, and potentially truncating, a filename prior to executing it.

This commit is contained in:
Juan Lang 2011-10-16 14:49:14 -07:00 committed by Alexandre Julliard
parent 726acf0f4a
commit 0aad594d5f
1 changed files with 3 additions and 4 deletions

View File

@ -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;