summaryrefslogtreecommitdiffstats
path: root/abs/core/freetype2/fix_segfault_with_harfbuzz.diff
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-11-24 20:39:39 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-11-24 20:39:39 (GMT)
commit72a7238eaf63b1ec1f96b4db325bcf0cab81bbb3 (patch)
tree36ea6f28785e9032b0da62bb0374d893d9c33bd7 /abs/core/freetype2/fix_segfault_with_harfbuzz.diff
parente3cde1ea45f9b06ca0c0977bcb0cabc8b85f1d5e (diff)
downloadlinhes_pkgbuild-72a7238eaf63b1ec1f96b4db325bcf0cab81bbb3.zip
linhes_pkgbuild-72a7238eaf63b1ec1f96b4db325bcf0cab81bbb3.tar.gz
linhes_pkgbuild-72a7238eaf63b1ec1f96b4db325bcf0cab81bbb3.tar.bz2
freetype2: update 2.5.1
Diffstat (limited to 'abs/core/freetype2/fix_segfault_with_harfbuzz.diff')
-rw-r--r--abs/core/freetype2/fix_segfault_with_harfbuzz.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/abs/core/freetype2/fix_segfault_with_harfbuzz.diff b/abs/core/freetype2/fix_segfault_with_harfbuzz.diff
new file mode 100644
index 0000000..a1832eb
--- /dev/null
+++ b/abs/core/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
+