summaryrefslogtreecommitdiff
path: root/extra/freetype2
diff options
context:
space:
mode:
Diffstat (limited to 'extra/freetype2')
-rw-r--r--extra/freetype2/PKGBUILD16
-rw-r--r--extra/freetype2/fix_segfault_with_harfbuzz.diff32
2 files changed, 43 insertions, 5 deletions
diff --git a/extra/freetype2/PKGBUILD b/extra/freetype2/PKGBUILD
index 3f2d9ecfa..453c91973 100644
--- a/extra/freetype2/PKGBUILD
+++ b/extra/freetype2/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 207503 2014-03-11 15:49:00Z andyrtr $
+# $Id: PKGBUILD 208094 2014-03-17 20:55:35Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=freetype2
pkgver=2.5.3
-pkgrel=1
+pkgrel=2
pkgdesc="TrueType font rendering library"
arch=(i686 x86_64)
license=('GPL')
@@ -14,18 +14,24 @@ depends=('zlib' 'bzip2' 'sh' 'libpng' 'harfbuzz')
source=(http://downloads.sourceforge.net/sourceforge/freetype/freetype-${pkgver}.tar.bz2{,.sig}
freetype-2.2.1-enable-valid.patch
freetype-2.5.1-enable-spr.patch
- freetype-2.5.1-enable-sph.patch)
+ freetype-2.5.1-enable-sph.patch
+ fix_segfault_with_harfbuzz.diff)
sha1sums=('d3c26cc17ec7fe6c36f4efc02ef92ab6aa3f4b46'
'SKIP'
'f279d922a873d62a8af50bfc873051839d194dca'
'13ee8d558593db991ad29fa090b461f914536104'
- 'c31fa3d342ead56f3acfa1f267b474a7686d0014')
+ 'c31fa3d342ead56f3acfa1f267b474a7686d0014'
+ 'c99013b4c19494cd26031878368191cd2b4459b0')
prepare() {
cd "${srcdir}/freetype-${pkgver}"
patch -Np1 -i "${srcdir}/freetype-2.2.1-enable-valid.patch"
patch -Np1 -i "${srcdir}/freetype-2.5.1-enable-spr.patch"
-
+
+ # fix segfaults # https://bugs.archlinux.org/task/39365
+ # http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=23367ff97f33ef6a2b7e1fced1157c87a46d9596
+ patch -Np1 -i "${srcdir}/fix_segfault_with_harfbuzz.diff"
+
# Disabled for now due to resistance
# Kept here for easier rebuilds via ABS
# https://bugs.archlinux.org/task/35274
diff --git a/extra/freetype2/fix_segfault_with_harfbuzz.diff b/extra/freetype2/fix_segfault_with_harfbuzz.diff
new file mode 100644
index 000000000..a1832eb16
--- /dev/null
+++ b/extra/freetype2/fix_segfault_with_harfbuzz.diff
@@ -0,0 +1,32 @@
+From 23367ff97f33ef6a2b7e1fced1157c87a46d9596 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 17 Mar 2014 06:33:14 +0000
+Subject: Fix Savannah bug #41869.
+
+This works around a problem with HarfBuzz (<= 0.9.26), which doesn't
+validate glyph indices returned by
+`hb_ot_layout_lookup_collect_glyphs'.
+
+* src/autofit/hbshim.c (af_get_coverage): Guard `idx'.
+
+* docs/CHANGES: Updated.
+---
+diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c
+index 11fb743..2eda8d7 100644
+--- a/src/autofit/hbshim.c
++++ b/src/autofit/hbshim.c
+@@ -347,6 +347,11 @@
+ count++;
+ #endif
+
++ /* HarfBuzz 0.9.26 and older doesn't validate glyph indices */
++ /* returned by `hb_ot_layout_lookup_collect_glyphs'... */
++ if ( idx >= (hb_codepoint_t)globals->glyph_count )
++ continue;
++
+ if ( gstyles[idx] == AF_STYLE_UNASSIGNED )
+ gstyles[idx] = (FT_Byte)style_class->style;
+ #ifdef FT_DEBUG_LEVEL_TRACE
+--
+cgit v0.9.0.2
+