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.
This commit is contained in:
Matthias Clasen 2013-11-28 01:34:52 -05:00
parent 4a687ed723
commit 7ef1eccd7e

View File

@ -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);