[packages/cairo] - fix a bug that caused dot (from graphviz) to crash - rel 4

baggins baggins at pld-linux.org
Sun Feb 15 11:37:56 CET 2015


commit 211d2cdc381db119a4b9fb1f3e52d252579ad5a2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Feb 15 11:37:27 2015 +0100

    - fix a bug that caused dot (from graphviz) to crash
    - rel 4

 ...ix_crash_in_fill_xrgb32_lerp_opaque_spans.patch | 32 ++++++++++++++++++++++
 cairo.spec                                         |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/cairo.spec b/cairo.spec
index 534f4c3..b434c2c 100644
--- a/cairo.spec
+++ b/cairo.spec
@@ -25,13 +25,14 @@ Summary:	Cairo - multi-platform 2D graphics library
 Summary(pl.UTF-8):	Cairo - wieloplatformowa biblioteka graficzna 2D
 Name:		cairo
 Version:	1.14.0
-Release:	3
+Release:	4
 License:	LGPL v2.1 or MPL v1.1
 Group:		Libraries
 Source0:	http://cairographics.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	fc3a5edeba703f906f2241b394f0cced
 Patch0:		%{name}-link.patch
 Patch1:		%{name}-gobject-deps.patch
+Patch2:		%{name}-fix_crash_in_fill_xrgb32_lerp_opaque_spans.patch
 URL:		http://cairographics.org/
 %{?with_directfb:BuildRequires:	DirectFB-devel}
 %if %{with gl} || %{with glesv2} || %{with openvg}
@@ -237,6 +238,7 @@ Dokumentacja API Cairo.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{?with_apidocs:%{__gtkdocize}}
diff --git a/cairo-fix_crash_in_fill_xrgb32_lerp_opaque_spans.patch b/cairo-fix_crash_in_fill_xrgb32_lerp_opaque_spans.patch
new file mode 100644
index 0000000..885571a
--- /dev/null
+++ b/cairo-fix_crash_in_fill_xrgb32_lerp_opaque_spans.patch
@@ -0,0 +1,32 @@
+From 5c82d91a5e15d29b1489dcb413b24ee7fdf59934 Mon Sep 17 00:00:00 2001
+From: Bryce Harrington <bryce at osg.samsung.com>
+Date: Wed, 3 Dec 2014 19:28:15 -0800
+Subject: image: Fix crash in _fill_xrgb32_lerp_opaque_spans
+
+If a span length is negative don't go out of bounds processing the fill
+data.
+
+Patch thanks to Ilya Sakhnenko <ilia.softway at gmail.com> on mailing list.
+
+Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
+
+diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
+index 6ff0f09..48072f8 100644
+--- a/src/cairo-image-compositor.c
++++ b/src/cairo-image-compositor.c
+@@ -2242,10 +2242,10 @@ _fill_xrgb32_lerp_opaque_spans (void *abstract_renderer, int y, int h,
+ 				     spans[0].x, y, len, 1, r->u.fill.pixel);
+ 		    } else {
+ 			uint32_t *d = (uint32_t*)(r->u.fill.data + r->u.fill.stride*y + spans[0].x*4);
+-			while (len--)
++			while (len-- > 0)
+ 			    *d++ = r->u.fill.pixel;
+ 		    }
+-		} else while (len--) {
++		} else while (len-- > 0) {
+ 		    *d = lerp8x4 (r->u.fill.pixel, a, *d);
+ 		    d++;
+ 		}
+-- 
+cgit v0.10.2
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cairo.git/commitdiff/211d2cdc381db119a4b9fb1f3e52d252579ad5a2



More information about the pld-cvs-commit mailing list