aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/posix/spawni.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d5e7e3da4f..c094c90440 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-03 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ [BZ #23913]
+ * sysdeps/posix/spawni.c (maybe_script_execute): Increment size of
+ new_argv by one.
+
2018-12-03 Carlos O'Donell <carlos@redhat.com>
[BZ #23923]
diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c
index c42fbd590e..c02171cc61 100644
--- a/sysdeps/posix/spawni.c
+++ b/sysdeps/posix/spawni.c
@@ -68,7 +68,7 @@ maybe_script_execute (struct posix_spawn_args *args)
ptrdiff_t argc = args->argc;
/* Construct an argument list for the shell. */
- char *new_argv[argc + 1];
+ char *new_argv[argc + 2];
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) args->file;
if (argc > 1)