rpms/compiz-fusion/F-12 cairo-crash-fix.patch, NONE, 1.1 compiz-fusion.spec, 1.55, 1.56

drago01 drago01 at fedoraproject.org
Sun Mar 28 12:12:52 UTC 2010


Author: drago01

Update of /cvs/pkgs/rpms/compiz-fusion/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19106

Modified Files:
	compiz-fusion.spec 
Added Files:
	cairo-crash-fix.patch 
Log Message:
fix bug 542804

cairo-crash-fix.patch:
 text.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- NEW FILE cairo-crash-fix.patch ---
diff -upNr compiz-plugins-main-0.8.2.orign/src/text/text.c compiz-plugins-main-0.8.2/src/text/text.c
--- compiz-plugins-main-0.8.2.orign/src/text/text.c	2009-03-05 04:36:21.000000000 +0100
+++ compiz-plugins-main-0.8.2/src/text/text.c	2010-03-28 14:10:21.337381042 +0200
@@ -284,8 +284,11 @@ textUpdateSurface (CompScreen      *s,
     Display *dpy = s->display->display;
 
     cairo_surface_destroy (data->surface);
+    data->surface = NULL;
     cairo_destroy (data->cr);
+    data->cr = NULL;
     XFreePixmap (dpy, data->pixmap);
+    data->pixmap = None;
 
     return textInitCairo (s, data, width, height);
 }
@@ -392,7 +395,7 @@ textRenderText (CompScreen           *s,
     TextSurfaceData surface;
     CompTextData    *retval = NULL;
 
-    if (!text)
+    if (!text || !strlen (text))
 	return NULL;
 
     memset (&surface, 0, sizeof (TextSurfaceData));
@@ -448,7 +451,7 @@ textRenderWindowTitle (CompScreen       
 		       const CompTextAttrib *attrib)
 {
     char         *text;
-    CompTextData *retval;
+    CompTextData *retval = NULL;
 
     if (withViewportNumber)
     {
@@ -480,11 +483,11 @@ textRenderWindowTitle (CompScreen       
 	text = textGetWindowName (s->display, window);
     }
 
-    if (!text)
-	return NULL;
+    if (text && strlen (text))
+	    retval = textRenderText (s, text, attrib);
 
-    retval = textRenderText (s, text, attrib);
-    free (text);
+    if (text)
+        free (text);
 
     return retval;
 }


Index: compiz-fusion.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compiz-fusion/F-12/compiz-fusion.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- compiz-fusion.spec	26 Dec 2009 17:00:38 -0000	1.55
+++ compiz-fusion.spec	28 Mar 2010 12:12:51 -0000	1.56
@@ -2,7 +2,7 @@
 
 Name: compiz-fusion
 Version: 0.8.2      
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: Collection of Compiz Fusion plugins for Compiz      
 
 Group: User Interface/Desktops        
@@ -14,6 +14,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version
 #Upstream commit 46960f12a9d213e5f0e841557e2ed2f7ea18cc79
 Patch1: compiz-0.7.8-x_to_glx_workaround.patch
 Patch2: resizeinfo-crashfix.patch
+#Upstream commit f101e9ed8771a3aa32de641b1a3bb43f208812c9
+Patch3: cairo-crash-fix.patch
 
 # libdrm is not available on these arches
 ExcludeArch: s390 s390x
@@ -69,6 +71,7 @@ This package contain development files r
 %setup -q -n compiz-plugins-main-%{version}
 %patch1 -p1 -b .xglx
 %patch2 -p1 -b .resize-crash
+%patch2 -p1 -b .cairo-crash
 
 %build
 %configure --enable-schemas
@@ -142,6 +145,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Mar 28 2010 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.2-7
+- Fix text plugin crash (RH #542804)
+
 * Sat Dec 26 2009 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.2-6
 - Bump release
 



More information about the scm-commits mailing list