Avoid a gconftool-2 crash

epel9
Matthias Clasen 15 years ago
parent 2690e18283
commit bc33481466

@ -7,7 +7,7 @@
Summary: A process-transparent configuration system Summary: A process-transparent configuration system
Name: GConf2 Name: GConf2
Version: 2.28.0 Version: 2.28.0
Release: 1%{?dist} Release: 3%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.28/GConf-%{version}.tar.bz2 Source: http://download.gnome.org/sources/GConf/2.28/GConf-%{version}.tar.bz2
@ -38,6 +38,8 @@ Conflicts: GConf2-dbus
Patch0: GConf-2.18.0.1-reload.patch Patch0: GConf-2.18.0.1-reload.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=568845 # http://bugzilla.gnome.org/show_bug.cgi?id=568845
Patch1: GConf-gettext.patch Patch1: GConf-gettext.patch
#
Patch2: no-access-crash.patch
%description %description
@ -75,6 +77,7 @@ which require GTK+.
%setup -q -n GConf-%{version} %setup -q -n GConf-%{version}
%patch0 -p1 -b .reload %patch0 -p1 -b .reload
%patch1 -p1 -b .gettext %patch1 -p1 -b .gettext
%patch2 -p1 -b .no-access
autoreconf -f -i autoreconf -f -i
@ -151,6 +154,12 @@ fi
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Mon Dec 14 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-3
- Avoid a crash when gconftool-2 can't read the db (#547238)
* Wed Oct 7 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-2
- Fix a problem with schema translations
* Wed Sep 23 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-1 * Wed Sep 23 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-1
- Update to 2.28.0 - Update to 2.28.0

@ -0,0 +1,49 @@
diff -up GConf-2.28.0/gconf/gconf.c.no-access GConf-2.28.0/gconf/gconf.c
--- GConf-2.28.0/gconf/gconf.c.no-access 2009-12-14 14:05:28.356082892 -0500
+++ GConf-2.28.0/gconf/gconf.c 2009-12-14 14:06:57.345056432 -0500
@@ -511,6 +511,7 @@ gconf_engine_get_local (const gchar
{
GConfEngine* conf;
GConfSource* source;
+ GConfSources* sources;
g_return_val_if_fail(address != NULL, NULL);
g_return_val_if_fail(err == NULL || *err == NULL, NULL);
@@ -519,10 +520,14 @@ gconf_engine_get_local (const gchar
if (source == NULL)
return NULL;
-
+
+ sources = gconf_sources_new_from_source(source);
+ if (sources == NULL)
+ return NULL;
+
conf = gconf_engine_blank(FALSE);
- conf->local_sources = gconf_sources_new_from_source(source);
+ conf->local_sources = sources;
g_assert (gconf_engine_is_local (conf));
@@ -534,13 +539,19 @@ gconf_engine_get_local_for_addresses (GS
GError **err)
{
GConfEngine *conf;
+ GConfSources* sources;
g_return_val_if_fail (addresses != NULL, NULL);
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
+ sources = gconf_sources_new_from_addresses (addresses, err);
+
+ if (sources == NULL)
+ return NULL;
+
conf = gconf_engine_blank (FALSE);
- conf->local_sources = gconf_sources_new_from_addresses (addresses, err);
+ conf->local_sources = sources;
g_assert (gconf_engine_is_local (conf));
Loading…
Cancel
Save