diff --git a/gio/gvdb/gvdb-reader.c b/gio/gvdb/gvdb-reader.c index 95093885f..ccae40e64 100644 --- a/gio/gvdb/gvdb-reader.c +++ b/gio/gvdb/gvdb-reader.c @@ -462,7 +462,7 @@ gvdb_table_get_names (GvdbTable *table, { GPtrArray *fixed_names; - fixed_names = g_ptr_array_sized_new (n_names); + fixed_names = g_ptr_array_sized_new (n_names + 1 /* NULL terminator */); for (i = 0; i < n_names; i++) if (names[i] != NULL) g_ptr_array_add (fixed_names, names[i]);