1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-05 04:07:10 +01:00

Fix argv_exec allocation size of argument vector

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-16 23:06:58 +02:00
parent 24c90b7700
commit 53bc182e09

View file

@ -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)