[glib] Fix g_subprocess_launcher_spawn
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix g_subprocess_launcher_spawn
- Date: Thu, 28 Nov 2013 06:37:15 +0000 (UTC)
commit 7ef1eccd7e97baee34e3ff76f1e19cdefc1b9eb8
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 28 01:34:52 2013 -0500
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.
gio/gsubprocesslauncher.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsubprocesslauncher.c b/gio/gsubprocesslauncher.c
index d6463e3..96f8454 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]