summaryrefslogtreecommitdiff
path: root/lib/util/argv_exec.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-10-16 23:06:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-10-16 23:06:58 +0200
commit53bc182e090a8830a61141c183ecd779e0b121ef (patch)
tree2ba24f9e4b128f5bbbe597f14516e9ecdc653c6d /lib/util/argv_exec.c
parent24c90b7700e18d0668799f8f343bc854a42dea20 (diff)
Fix argv_exec allocation size of argument vector
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/util/argv_exec.c')
-rw-r--r--lib/util/argv_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util/argv_exec.c b/lib/util/argv_exec.c
index e39153c..384a64d 100644
--- a/lib/util/argv_exec.c
+++ b/lib/util/argv_exec.c
@@ -54,7 +54,7 @@ int setup_tty(const char *tty, bool truncate)
void argv_exec(exec_t *e)
{
- char **argv = alloca(e->argc + 1), *ptr;
+ char **argv = alloca(sizeof(char *) * (e->argc + 1)), *ptr;
int i;
for (ptr = e->args, i = 0; i < e->argc; ++i, ptr += strlen(ptr) + 1)