rpms/compiz/F-12 compiz-0.8.2-cairo-crash.patch, NONE, 1.1 compiz.spec, 1.191, 1.192
drago01
drago01 at fedoraproject.org
Sat Dec 26 20:13:54 UTC 2009
Author: drago01
Update of /cvs/pkgs/rpms/compiz/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28356
Modified Files:
compiz.spec
Added Files:
compiz-0.8.2-cairo-crash.patch
Log Message:
fix crash
compiz-0.8.2-cairo-crash.patch:
text.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
--- NEW FILE compiz-0.8.2-cairo-crash.patch ---
>From f101e9ed8771a3aa32de641b1a3bb43f208812c9 Mon Sep 17 00:00:00 2001
From: Danny Baumann <dannybaumann at web.de>
Date: Fri, 04 Sep 2009 06:10:13 +0000
Subject: Add protection against empty strings (cairo doesn't like 0x0 sized
surfaces).
---
diff --git a/text.c b/text.c
index 723772b..0c1ee7e 100644
--- a/text.c
+++ b/text.c
@@ -284,8 +284,13 @@ 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 +397,7 @@ textRenderText (CompScreen *s,
TextSurfaceData surface;
CompTextData *retval = NULL;
- if (!text)
+ if (!text || !strlen (text))
return NULL;
memset (&surface, 0, sizeof (TextSurfaceData));
@@ -448,7 +453,7 @@ textRenderWindowTitle (CompScreen *s,
const CompTextAttrib *attrib)
{
char *text = NULL;
- CompTextData *retval;
+ CompTextData *retval = NULL;
if (withViewportNumber)
{
@@ -480,11 +485,11 @@ textRenderWindowTitle (CompScreen *s,
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;
}
--
cgit v0.8.2
Index: compiz.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/F-12/compiz.spec,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -p -r1.191 -r1.192
--- compiz.spec 26 Dec 2009 16:34:35 -0000 1.191
+++ compiz.spec 26 Dec 2009 20:13:54 -0000 1.192
@@ -13,7 +13,7 @@ URL: http://www.go-compiz.org
License: GPLv2+ and LGPLv2+ and MIT
Group: User Interface/Desktops
Version: 0.8.2
-Release: 21%{?dist}
+Release: 22%{?dist}
Summary: OpenGL window and compositing manager
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -80,6 +80,8 @@ Patch130: compiz-0.8.2-multiscreen-decor
Patch131: compiz-0.8.2-icon-fix.patch
+Patch132: compiz-0.8.2-cairo-crash.patch
+
%description
Compiz is one of the first OpenGL-accelerated compositing window
managers for the X Window System. The integration allows it to perform
@@ -153,6 +155,7 @@ and other kde integration related stuff.
%patch129 -p1 -b .unload-plugin
%patch130 -p1 -b .multi-screen
%patch131 -p1 -b .icon-fix
+%patch132 -p1 -b .cairo-crash
%build
rm -rf $RPM_BUILD_ROOT
@@ -330,6 +333,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Dec 26 2009 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.2-22
+- Fix crash (RH #542804)
+
* Sat Dec 26 2009 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.2-21
- Fix wall plugin regression
- Fix decorator on multi screen setups (RH #546172)
More information about the fedora-extras-commits
mailing list