projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a687ed
)
Fix g_subprocess_launcher_spawn
author
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 Nov 2013 06:34:52 +0000
(
01:34
-0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Thu, 28 Nov 2013 06:34:52 +0000
(
01:34
-0500)
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
patch
|
blob
|
history
diff --git
a/gio/gsubprocesslauncher.c
b/gio/gsubprocesslauncher.c
index
d6463e3
..
96f8454
100644
(file)
--- 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);