ref: 5f8f44d218c0e3d5c7c9f26ac5d04c399e58d2e7
parent: 8bbcfb2c2f4fccdb9cbe87fc81503e09cdd0cb8c
author: Werner Lemberg <[email protected]>
date: Thu Oct 1 10:16:03 EDT 2015
[sfnt] Make `tt_cmap4_char_map_linear' faster (#46078). * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to reject too large glyph indices.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-01 Werner Lemberg <[email protected]>
+
+ [sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
+
+ * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
+ reject too large glyph indices.
+
2015-09-30 Alexei Podtelezhnikov <[email protected]>
[smooth] Clean up worker.
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -1115,7 +1115,11 @@
gindex = TT_PEEK_USHORT( r );
if ( gindex )
+ {
gindex = (FT_UInt)( (FT_Int)gindex + delta ) & 0xFFFFU;
+ if ( gindex >= (FT_UInt)face->root.num_glyphs )
+ gindex = 0;
+ }
}
else
{