mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-23 11:31:05 +00:00
Fix incorrect buffer size calculation in ProcessUtils::runAsyncUnix()
The buffer needs one entry for the executable path, args.size() args for the supplied arguments and one further entry for the null terminator.
This commit is contained in:
parent
ced6b097b4
commit
07ed391080
1 changed files with 1 additions and 1 deletions
|
@ -252,7 +252,7 @@ int ProcessUtils::runAsyncUnix(const std::string& executable,
|
||||||
if (child == 0)
|
if (child == 0)
|
||||||
{
|
{
|
||||||
// in child process
|
// in child process
|
||||||
char** argBuffer = new char*[args.size() + 1];
|
char** argBuffer = new char*[args.size() + 2];
|
||||||
argBuffer[0] = strdup(executable.c_str());
|
argBuffer[0] = strdup(executable.c_str());
|
||||||
int i = 1;
|
int i = 1;
|
||||||
for (std::list<std::string>::const_iterator iter = args.begin(); iter != args.end(); iter++)
|
for (std::list<std::string>::const_iterator iter = args.begin(); iter != args.end(); iter++)
|
||||||
|
|
Loading…
Reference in a new issue