[pango/f20] Backport a patch to fix SIGFPE in pango_layout_iter_get_char_extents() (#1036351)
Akira TAGOH
tagoh at fedoraproject.org
Wed Jan 22 12:05:03 UTC 2014
commit 63ba2ba8326e43bf8a04ffe9a0c782c2d6e4bc30
Author: Akira TAGOH <tagoh at redhat.com>
Date: Wed Jan 22 21:05:22 2014 +0900
Backport a patch to fix SIGFPE in pango_layout_iter_get_char_extents() (#1036351)
pango-fix-sigfpe.patch | 35 +++++++++++++++++++++++++++++++++++
pango.spec | 8 +++++++-
2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/pango-fix-sigfpe.patch b/pango-fix-sigfpe.patch
new file mode 100644
index 0000000..2028e62
--- /dev/null
+++ b/pango-fix-sigfpe.patch
@@ -0,0 +1,35 @@
+From a6c318ee505aeabe6f84e1543d68834b9e0e7acf Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad at behdad.org>
+Date: Sun, 15 Dec 2013 18:42:17 -0500
+Subject: [PATCH] Bug 720379 - SIGFPE in pango_layout_iter_get_char_extents()
+
+Untested.
+---
+ pango/pango-layout.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/pango/pango-layout.c b/pango/pango-layout.c
+index a024d11..607a5f0 100644
+--- a/pango/pango-layout.c
++++ b/pango/pango-layout.c
+@@ -6178,8 +6178,15 @@ pango_layout_iter_get_char_extents (PangoLayoutIter *iter,
+ return;
+ }
+
+- x0 = (iter->character_position * cluster_rect.width) / iter->cluster_num_chars;
+- x1 = ((iter->character_position + 1) * cluster_rect.width) / iter->cluster_num_chars;
++ if (iter->cluster_num_chars)
++ {
++ x0 = (iter->character_position * cluster_rect.width) / iter->cluster_num_chars;
++ x1 = ((iter->character_position + 1) * cluster_rect.width) / iter->cluster_num_chars;
++ }
++ else
++ {
++ x0 = x1 = 0;
++ }
+
+ logical_rect->width = x1 - x0;
+ logical_rect->height = cluster_rect.height;
+--
+1.8.4.2
+
diff --git a/pango.spec b/pango.spec
index 6b438bc..48bd55b 100644
--- a/pango.spec
+++ b/pango.spec
@@ -10,7 +10,7 @@
Summary: System for layout and rendering of internationalized text
Name: pango
Version: 1.36.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
#VCS: git:git://git.gnome.org/pango
@@ -35,6 +35,8 @@ BuildRequires: cairo-gobject-devel
# Bootstrap requirements
BuildRequires: gnome-common intltool gtk-doc
+Patch0: %{name}-fix-sigfpe.patch
+
%description
Pango is a library for laying out and rendering of text, with an emphasis
on internationalization. Pango can be used anywhere that text layout is needed,
@@ -72,6 +74,7 @@ the functionality of the installed %{name} package.
%prep
%setup -q -n pango-%{version}
+%patch0 -p1 -b .0-sigfpe
%build
@@ -155,6 +158,9 @@ fi
%changelog
+* Wed Jan 22 2014 Akira TAGOH <tagoh at redhat.com> - 1.36.1-2
+- Backport a patch to fix SIGFPE in pango_layout_iter_get_char_extents() (#1036351)
+
* Tue Nov 12 2013 Richard Hughes <rhughes at redhat.com> - 1.36.1-1
- Update to 1.36.1
More information about the scm-commits
mailing list