aboutsummaryrefslogtreecommitdiff
path: root/graphics/silgraphite
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2016-02-18 23:15:27 +0000
committerMark Felder <feld@FreeBSD.org>2016-02-18 23:15:27 +0000
commite44036c1148b5c4d64b01030bc6592b6d12937bc (patch)
tree5dd9f1baaad1d549c9d956bc34ce0be586c8686b /graphics/silgraphite
parent3d9bd39ed620d0f73a52f094d944ed1744757806 (diff)
downloadports-e44036c1148b5c4d64b01030bc6592b6d12937bc.tar.gz
ports-e44036c1148b5c4d64b01030bc6592b6d12937bc.zip
Notes
Diffstat (limited to 'graphics/silgraphite')
-rw-r--r--graphics/silgraphite/Makefile2
-rw-r--r--graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp20
2 files changed, 21 insertions, 1 deletions
diff --git a/graphics/silgraphite/Makefile b/graphics/silgraphite/Makefile
index 283d3b8a0af0..ce90b8161f85 100644
--- a/graphics/silgraphite/Makefile
+++ b/graphics/silgraphite/Makefile
@@ -3,7 +3,7 @@
PORTNAME= silgraphite
PORTVERSION= 2.3.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics devel
MASTER_SITES= SF
diff --git a/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp b/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp
new file mode 100644
index 000000000000..b07e94d6fb79
--- /dev/null
+++ b/graphics/silgraphite/files/patch-engine_src_font_TtfUtil.cpp
@@ -0,0 +1,20 @@
+--- engine/src/font/TtfUtil.cpp.orig 2009-01-29 08:33:19 UTC
++++ engine/src/font/TtfUtil.cpp
+@@ -1106,7 +1106,7 @@ size_t LocaLookup(gr::gid16 nGlyphId,
+ // CheckTable verifies the index_to_loc_format is valid
+ if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::ShortIndexLocFormat)
+ { // loca entries are two bytes and have been divided by two
+- if (nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
++ if (lLocaSize >= 2 && nGlyphId <= (lLocaSize >> 1) - 1) // allow sentinel value to be accessed
+ {
+ const uint16 * pTable = reinterpret_cast<const uint16 *>(pLoca);
+ return (read(pTable[nGlyphId]) << 1);
+@@ -1115,7 +1115,7 @@ size_t LocaLookup(gr::gid16 nGlyphId,
+
+ if (read(pTable->index_to_loc_format) == Sfnt::FontHeader::LongIndexLocFormat)
+ { // loca entries are four bytes
+- if (nGlyphId <= (lLocaSize >> 2) - 1)
++ if (lLocaSize >= 4 && nGlyphId <= (lLocaSize >> 2) - 1)
+ {
+ const uint32 * pTable = reinterpret_cast<const uint32 *>(pLoca);
+ return read(pTable[nGlyphId]);