[pango/f20] Backport a patch to fix a crash in pango_ot_info_get() (#1053798)

Akira TAGOH tagoh at fedoraproject.org
Thu Feb 13 03:12:42 UTC 2014


commit e23aed8efb6d8953b4709f2683116084f220b2c3
Author: Akira TAGOH <tagoh at redhat.com>
Date:   Thu Feb 13 12:13:14 2014 +0900

    Backport a patch to fix a crash in pango_ot_info_get() (#1053798)

 pango-fix-crash-in-pango_ot_info_get.patch |   27 +++++++++++++++++++++++++++
 pango.spec                                 |    4 ++++
 2 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/pango-fix-crash-in-pango_ot_info_get.patch b/pango-fix-crash-in-pango_ot_info_get.patch
new file mode 100644
index 0000000..9d36954
--- /dev/null
+++ b/pango-fix-crash-in-pango_ot_info_get.patch
@@ -0,0 +1,27 @@
+From d65e87def745ad4a61e3b1610ae23bdba07ae6ac Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira at tagoh.org>
+Date: Wed, 12 Feb 2014 18:39:27 +0900
+Subject: [PATCH] Avoid a crash when FT_Face is null
+
+https://bugzilla.gnome.org/show_bug.cgi?id=724006
+---
+ pango/pango-ot-info.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
+index f6dc1ac..d494d7f 100644
+--- a/pango/pango-ot-info.c
++++ b/pango/pango-ot-info.c
+@@ -88,6 +88,9 @@ pango_ot_info_get (FT_Face face)
+ {
+   PangoOTInfo *info;
+ 
++  if (G_UNLIKELY (!face))
++    return NULL;
++
+   if (G_LIKELY (face->generic.data && face->generic.finalizer == pango_ot_info_finalizer))
+     return face->generic.data;
+   else
+-- 
+1.8.4.2
+
diff --git a/pango.spec b/pango.spec
index 48bd55b..32bf960 100644
--- a/pango.spec
+++ b/pango.spec
@@ -36,6 +36,7 @@ BuildRequires: cairo-gobject-devel
 BuildRequires: gnome-common intltool gtk-doc
 
 Patch0: %{name}-fix-sigfpe.patch
+Patch1: %{name}-fix-crash-in-pango_ot_info_get.patch
 
 %description
 Pango is a library for laying out and rendering of text, with an emphasis
@@ -158,6 +159,9 @@ fi
 
 
 %changelog
+* Thu Feb 13 2014 Akira TAGOH <tagoh at redhat.com>
+- Backport a patch to fix a crash in pango_ot_info_get() (#1053798)
+
 * 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)
 


More information about the fonts-bugs mailing list