mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[EXPLORER_NEW]
- Fix possible buffer overflow: ExpandEnvironmentStrings wants character count size of a buffer, not byte sized. Spotted by Thomas Faber. See issue #6053 for more details. svn path=/trunk/; revision=56888
This commit is contained in:
@@ -245,7 +245,7 @@ static int runCmd(LPWSTR cmdline, LPCWSTR dir, BOOL wait, BOOL minimized)
|
||||
DWORD exit_code=0;
|
||||
WCHAR szCmdLineExp[MAX_PATH+1]= L"\0";
|
||||
|
||||
ExpandEnvironmentStrings(cmdline, szCmdLineExp, sizeof(szCmdLineExp));
|
||||
ExpandEnvironmentStringsW(cmdline, szCmdLineExp, sizeof(szCmdLineExp) / sizeof(WCHAR));
|
||||
|
||||
memset(&si, 0, sizeof(si));
|
||||
si.cb=sizeof(si);
|
||||
|
||||
Reference in New Issue
Block a user