[colord] fix a gsd crash

Matthias Clasen mclasen at fedoraproject.org
Fri Jan 20 05:29:22 UTC 2012


commit 8447db4ae4fe2f68adc95636d0ddfcb246e86776
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Fri Jan 20 00:29:18 2012 -0500

    fix a gsd crash

 colord.spec        |    9 ++++++++-
 variant-iter.patch |   14 ++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/colord.spec b/colord.spec
index e1fe4dd..573b210 100644
--- a/colord.spec
+++ b/colord.spec
@@ -1,11 +1,14 @@
 Summary:   Color daemon
 Name:      colord
 Version:   0.1.16
-Release:   1%{?dist}
+Release:   2%{?dist}
 License:   GPLv2+ and LGPLv2+
 URL:       http://www.freedesktop.org/software/colord/
 Source0:   http://www.freedesktop.org/software/colord/releases/%{name}-%{version}.tar.xz
 
+# https://bugs.freedesktop.org/show_bug.cgi?id=44966
+Patch0: variant-iter.patch
+
 BuildRequires: dbus-devel
 BuildRequires: docbook-utils
 BuildRequires: gettext
@@ -37,6 +40,7 @@ Files for development with %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
@@ -102,6 +106,9 @@ exit 0
 %{_datadir}/vala/vapi/*.vapi
 
 %changelog
+* Fri Jan 20 2012 Matthias Clasen <mclasen at redha.com> - 0.1.16-2
+- Fix some obvious bugs
+
 * Tue Jan 17 2012 Richard Hughes <richard at hughsie.com> 0.1.16-1
 - New upstream version
 - Now runs as a colord user rather than as root.
diff --git a/variant-iter.patch b/variant-iter.patch
new file mode 100644
index 0000000..6b94fc9
--- /dev/null
+++ b/variant-iter.patch
@@ -0,0 +1,14 @@
+diff --git a/libcolord/cd-profile.c b/libcolord/cd-profile.c
+index 03decf8..95efc46 100644
+--- a/libcolord/cd-profile.c
++++ b/libcolord/cd-profile.c
+@@ -440,8 +440,7 @@ cd_profile_set_metadata_from_variant (CdProfile *profile, GVariant *variant)
+ 	g_hash_table_remove_all (profile->priv->metadata);
+ 
+ 	/* insert the new metadata */
+-	g_variant_get (variant, "a{ss}",
+-		       &iter);
++	g_variant_init (&iter, variant);
+ 	while (g_variant_iter_loop (iter, "{ss}",
+ 				    &prop_key, &prop_value)) {
+ 		g_hash_table_insert (profile->priv->metadata,


More information about the scm-commits mailing list