[rhythmbox] backport fix for BGO #719514 / RH #1047018 (use_after_deref)

Adam Williamson adamwill at fedoraproject.org
Mon Dec 30 17:27:51 UTC 2013


commit b23bbea7512d5bec4c15301fa8ffe1641e430af3
Author: Adam Williamson <awilliam at redhat.com>
Date:   Mon Dec 30 09:27:38 2013 -0800

    backport fix for BGO #719514 / RH #1047018 (use_after_deref)

 rhythmbox.spec        |    9 ++++++++-
 use_after_deref.patch |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/rhythmbox.spec b/rhythmbox.spec
index ee29d4a..c14da85 100644
--- a/rhythmbox.spec
+++ b/rhythmbox.spec
@@ -5,7 +5,7 @@
 Name: rhythmbox
 Summary: Music Management Application
 Version: 3.0.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+ with exceptions and GFDL
 Group: Applications/Multimedia
 URL: http://projects.gnome.org/rhythmbox/
@@ -15,6 +15,9 @@ Source: http://download.gnome.org/sources/rhythmbox/3.0/%{name}-%{version}.tar.x
 # https://bugzilla.gnome.org/show_bug.cgi?id=710493
 # Upstream 344545b32a
 Patch0: generate_images_hidden.patch
+# https://bugzilla.gnome.org/show_bug.cgi?id=719514
+# Upstream b151337685, fixes a bug introduced by patch0
+Patch1: use_after_deref.patch
 
 Requires: gnome-icon-theme-legacy
 Requires: gtk3%{?_isa} >= %{gtk3_version}
@@ -91,6 +94,7 @@ a Rhythmbox plugin.
 %prep
 %setup -q
 %patch0 -p1 -b .images
+%patch1 -p1 -b .use_after_deref
 
 %build
 %configure \
@@ -190,6 +194,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || :
 %{_datadir}/gir-1.0/*.gir
 
 %changelog
+* Mon Dec 30 2013 Adam Williamson <awilliam at redhat.com> - 3.0.1-3
+- backport fix for BGO #719514 / RH #1047018 (use_after_deref)
+
 * Thu Dec 26 2013 Adam Williamson <awilliam at redhat.com> - 3.0.1-2
 - backport fix for BGO #710493 / RH #1043259 (generate_images_hidden)
 
diff --git a/use_after_deref.patch b/use_after_deref.patch
new file mode 100644
index 0000000..7dbc64e
--- /dev/null
+++ b/use_after_deref.patch
@@ -0,0 +1,40 @@
+From b151337685eff709060e805767a9e8c067f2776d Mon Sep 17 00:00:00 2001
+From: Jonathan Matthew <jonathan at d14n.org>
+Date: Thu, 05 Dec 2013 01:53:12 +0000
+Subject: fading-image: fix use-after-deref introduced in previous commit
+
+https://bugzilla.gnome.org/show_bug.cgi?id=719514
+---
+diff --git a/widgets/rb-fading-image.c b/widgets/rb-fading-image.c
+index ed1813e..bbd953f 100644
+--- a/widgets/rb-fading-image.c
++++ b/widgets/rb-fading-image.c
+@@ -648,12 +648,12 @@ composite_into_current (RBFadingImage *image)
+ 	int width;
+ 	int height;
+ 
+-	if (image->priv->current_pat != NULL) {
+-		cairo_pattern_destroy (image->priv->current_pat);
+-	}
+ 	width = gtk_widget_get_allocated_width (GTK_WIDGET (image)) - 2 * BORDER_WIDTH;
+ 	height = gtk_widget_get_allocated_height (GTK_WIDGET (image)) - 2 * BORDER_WIDTH;
+ 	if (width < 1 || height < 1) {
++		if (image->priv->current_pat != NULL) {
++			cairo_pattern_destroy (image->priv->current_pat);
++		}
+ 		image->priv->current_pat = NULL;
+ 		image->priv->current_width = 0;
+ 		image->priv->current_height = 0;
+@@ -667,6 +667,9 @@ composite_into_current (RBFadingImage *image)
+ 	render_next (image, cr, width, height, FALSE);
+ 	cairo_destroy (cr);
+ 
++	if (image->priv->current_pat != NULL) {
++		cairo_pattern_destroy (image->priv->current_pat);
++	}
+ 	image->priv->current_pat = cairo_pattern_create_for_surface (dest);
+ 	image->priv->current_width = width;
+ 	image->priv->current_height = height;
+--
+cgit v0.9.2
+


More information about the scm-commits mailing list