diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-11-28 01:34:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-11-28 01:34:52 -0500 |
commit | 7ef1eccd7e97baee34e3ff76f1e19cdefc1b9eb8 (patch) | |
tree | 18ea3cabec4e2c535e37ff318691d070d54408d8 /gio/gsubprocesslauncher.c | |
parent | 4a687ed7237143be0e6c38c970aef0603793fc71 (diff) |
Fix g_subprocess_launcher_spawn
This function turns a varargs argument list into a string array,
but forgets to NULL-terminate it. This function was not covered
by unit tests...so it was broken.
Diffstat (limited to 'gio/gsubprocesslauncher.c')
-rw-r--r-- | gio/gsubprocesslauncher.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gio/gsubprocesslauncher.c b/gio/gsubprocesslauncher.c index d6463e3ed..96f8454fe 100644 --- a/gio/gsubprocesslauncher.c +++ b/gio/gsubprocesslauncher.c @@ -701,6 +701,8 @@ g_subprocess_launcher_spawn (GSubprocessLauncher *launcher, while ((arg = va_arg (ap, const gchar *))) g_ptr_array_add (args, (gchar *) arg); + g_ptr_array_add (args, NULL); + result = g_subprocess_launcher_spawnv (launcher, (const gchar * const *) args->pdata, error); g_ptr_array_free (args, TRUE); |