Copy trailing NULL into new ARGV array. (#67673)

Sat Dec 29 15:07:21 2001  Owen Taylor  <otaylor@redhat.com>

        * glib/gspawn.c (script_execute): Copy	trailing	NULL
        into new ARGV array. (#67673)
This commit is contained in:
Owen Taylor 2001-12-29 20:11:07 +00:00 committed by Owen Taylor
parent 963926c795
commit a740df4158
9 changed files with 43 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1,3 +1,8 @@
Sat Dec 29 15:07:21 2001 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c (script_execute): Copy trailing NULL
into new ARGV array. (#67673)
2001-12-28 Sven Neumann <sven@gimp.org>
* glib/gmessages.c: only include printf_string_upper_bound() if

View File

@ -1248,13 +1248,13 @@ script_execute (const gchar *file,
{
gchar **new_argv;
new_argv = g_new0 (gchar*, argc + 1);
new_argv = g_new0 (gchar*, argc + 2); /* /bin/sh and NULL */
new_argv[0] = (char *) "/bin/sh";
new_argv[1] = (char *) file;
while (argc > 1)
while (argc > 0)
{
new_argv[argc] = argv[argc - 1];
new_argv[argc + 1] = argv[argc];
--argc;
}