mirror of
https://github.com/reactos/reactos.git
synced 2024-10-03 07:53:49 +00:00
shell32: Fixed potential buffer overwrite in execute_from_key (Coverity).
Marcus Meissner <marcus at jet.franken.de> svn path=/trunk/; revision=39402
This commit is contained in:
parent
63e35e6ed4
commit
ff0436a020
|
@ -908,6 +908,8 @@ static UINT_PTR execute_from_key(LPWSTR key, LPCWSTR lpFile, WCHAR *env, LPCWSTR
|
|||
|
||||
/* Is there a replace() function anywhere? */
|
||||
cmdlen /= sizeof(WCHAR);
|
||||
if (cmdlen >= sizeof(cmd)/sizeof(WCHAR))
|
||||
cmdlen = sizeof(cmd)/sizeof(WCHAR)-1;
|
||||
cmd[cmdlen] = '\0';
|
||||
SHELL_ArgifyW(param, sizeof(param)/sizeof(WCHAR), cmd, lpFile, psei->lpIDList, szCommandline, &resultLen);
|
||||
if (resultLen > sizeof(param)/sizeof(WCHAR))
|
||||
|
|
Loading…
Reference in a new issue