mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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:
parent
4a687ed723
commit
7ef1eccd7e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user