[gnome-settings-daemon] [xsettings] Validate GConf keys read from the configuration



commit 2638abb2360606e37517513a65932bab125d9068
Author: Jens Granseuer <jensgr gmx net>
Date:   Sat Sep 12 14:41:42 2009 +0200

    [xsettings] Validate GConf keys read from the configuration
    
    The xsettings plugin uses user-supplied values as GConf keys.
    Validate those keys before actually trying to use them so we
    don't cause assertions in GConf. Closes bug #594821.

 plugins/xsettings/gsd-xsettings-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index e5a7246..8aee25b 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -719,7 +719,7 @@ get_gtk_modules (GConfClient *client)
                         case GCONF_VALUE_STRING:
                                 /* linked to another GConf key of type bool */
                                 key = gconf_value_get_string (v);
-                                if (key != NULL) {
+                                if (key != NULL && gconf_valid_key (key, NULL)) {
                                         enabled = gconf_client_get_bool (client, key, NULL);
                                 }
                                 break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]