mirror of
https://github.com/mirror/make.git
synced 2024-12-29 14:30:42 +08:00
* src/job.c (child_execute_job): Allocate space for argv NULL.
This commit is contained in:
parent
bd4ce86785
commit
96285f875b
@ -2399,7 +2399,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
||||
for (pp = argv; *pp != NULL; ++pp)
|
||||
++l;
|
||||
|
||||
nargv = xmalloc (sizeof (char *) * (l + 2));
|
||||
nargv = xmalloc (sizeof (char *) * (l + 3));
|
||||
nargv[0] = (char *)default_shell;
|
||||
nargv[1] = cmd;
|
||||
memcpy (&nargv[2], &argv[1], sizeof (char *) * l);
|
||||
|
Loading…
Reference in New Issue
Block a user