mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 13:53:30 +02:00
GSettings: be more careful about keys names with /
Prevent attempts to access keys ending with slashes that exist in the schema file as references to child schemas. Also: don't emit change signals for these same keys.
This commit is contained in:
@@ -636,7 +636,7 @@ g_settings_schema_get_value (GSettingsSchema *schema,
|
||||
|
||||
value = gvdb_table_get_raw_value (schema->table, key);
|
||||
|
||||
if G_UNLIKELY (value == NULL)
|
||||
if G_UNLIKELY (value == NULL || !g_variant_is_of_type (value, G_VARIANT_TYPE_TUPLE))
|
||||
g_error ("Settings schema '%s' does not contain a key named '%s'", schema->id, key);
|
||||
|
||||
iter = g_variant_iter_new (value);
|
||||
|
Reference in New Issue
Block a user