Fix off by one overflow with 31 args (#541)

This commit is contained in:
Hanno Böck 2019-11-12 18:04:31 +01:00 committed by Mounir IDRASSI
parent 8e9627877d
commit f5aea06281

View File

@ -30,7 +30,7 @@ namespace VeraCrypt
string Process::Execute (const string &processName, const list <string> &arguments, int timeOut, ProcessExecFunctor *execFunctor, const Buffer *inputData)
{
char *args[32];
if (array_capacity (args) <= arguments.size())
if (array_capacity (args) <= (arguments.size() + 1))
throw ParameterTooLarge (SRC_POS);
#if 0