diff options
author | root <root@rshg047.dnsready.net> | 2011-05-09 22:34:00 +0000 |
---|---|---|
committer | root <root@rshg047.dnsready.net> | 2011-05-09 22:34:00 +0000 |
commit | bbb460f85242e6ac03f47b74b9d0be66ff089ac4 (patch) | |
tree | c05f121bc450e6f4528e13b4eef371f3b0d2bc0f /extra/dconf/fix-crash-when-user-database-is-not-present.patch | |
parent | d2f2d3b5c845807249680c275031f94047f9e762 (diff) |
Mon May 9 22:34:00 UTC 2011
Diffstat (limited to 'extra/dconf/fix-crash-when-user-database-is-not-present.patch')
-rw-r--r-- | extra/dconf/fix-crash-when-user-database-is-not-present.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/dconf/fix-crash-when-user-database-is-not-present.patch b/extra/dconf/fix-crash-when-user-database-is-not-present.patch new file mode 100644 index 000000000..ce748492b --- /dev/null +++ b/extra/dconf/fix-crash-when-user-database-is-not-present.patch @@ -0,0 +1,29 @@ +From c80896f5644ec0a07822047dd7e899da63b42e89 Mon Sep 17 00:00:00 2001 +From: Ryan Lortie <desrt@desrt.ca> +Date: Sun, 08 May 2011 12:08:38 +0000 +Subject: Fix crash when user database is not present + +If we fail to open the database in the user's home directory then the +variable will be NULL. The refactor of the read function for lockdown +support missed this check, resulting in a rather dramatic crash on fresh +accounts. +--- +diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c +index ec99116..087d780 100644 +--- a/engine/dconf-engine.c ++++ b/engine/dconf-engine.c +@@ -452,7 +452,11 @@ dconf_engine_read_internal (DConfEngine *engine, + break; + + while (i < limit && value == NULL) +- value = gvdb_table_get_value (engine->gvdbs[i++], key); ++ { ++ if (engine->gvdbs[i] != NULL) ++ value = gvdb_table_get_value (engine->gvdbs[i], key); ++ i++; ++ } + + g_static_mutex_unlock (&engine->lock); + +-- +cgit v0.9 |