mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-23 15:18:15 -05:00
testlibrary: ensure that contents_array is NULL-terminated
Otherwise g_strjoinv() wanders off the end into uninitialized memory. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
committed by
Alexander Larsson
parent
902fb71399
commit
63daf2bb95
@@ -691,6 +691,7 @@ add_extra_installation (const char *id,
|
||||
if (priority != NULL)
|
||||
g_ptr_array_add (contents_array, g_strdup_printf ("Priority=%s", priority));
|
||||
|
||||
g_ptr_array_add (contents_array, NULL);
|
||||
contents_string = g_strjoinv ("\n", (char**)contents_array->pdata);
|
||||
|
||||
conffile_path = g_strconcat (flatpak_installationsdir, "/", id, ".conf", NULL);
|
||||
|
||||
Reference in New Issue
Block a user