mirror of
https://github.com/pygos/init.git
synced 2024-11-22 03:09:46 +01:00
Fix argv_exec allocation size of argument vector
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
24c90b7700
commit
53bc182e09
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ int setup_tty(const char *tty, bool truncate)
|
||||||
|
|
||||||
void argv_exec(exec_t *e)
|
void argv_exec(exec_t *e)
|
||||||
{
|
{
|
||||||
char **argv = alloca(e->argc + 1), *ptr;
|
char **argv = alloca(sizeof(char *) * (e->argc + 1)), *ptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (ptr = e->args, i = 0; i < e->argc; ++i, ptr += strlen(ptr) + 1)
|
for (ptr = e->args, i = 0; i < e->argc; ++i, ptr += strlen(ptr) + 1)
|
||||||
|
|
Loading…
Reference in a new issue