From f5aea0628116b7e6bfe958b105a72a254eb19c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20B=C3=B6ck?= Date: Tue, 12 Nov 2019 18:04:31 +0100 Subject: Fix off by one overflow with 31 args (#541) --- src/Platform/Unix/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Platform') diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp index ac8598f0..a21e118d 100644 --- a/src/Platform/Unix/Process.cpp +++ b/src/Platform/Unix/Process.cpp @@ -30,7 +30,7 @@ namespace VeraCrypt string Process::Execute (const string &processName, const list &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 -- cgit v1.2.3