* tighten modest_conf_key_escape contract to disallow empty keys;
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 4 Apr 2007 07:02:08 +0000 (07:02 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Wed, 4 Apr 2007 07:02:08 +0000 (07:02 +0000)
  gconf_key_escape crashes with such keys

pmo-trunk-r1497

src/modest-conf.c

index d276082..4463246 100644 (file)
@@ -384,7 +384,8 @@ gchar*
 modest_conf_key_escape (const gchar* key)
 {
        g_return_val_if_fail (key, NULL);
-
+       g_return_val_if_fail (strlen (key) > 0, key);
+       
        return gconf_escape_key (key, strlen(key));
 }