ref: 416d87963fc96b892271f0cb176c761690e4c403
parent: b6cb4997e8f0accd98b9589f29e4654e8002501f
author: Jon Anderson <[email protected]>
date: Fri Feb 6 05:16:45 EST 2015
[truetype] Fix regression in the incremental glyph loader. * src/truetype/ttgload.c (load_truetype_glyph): For incremental fonts, the glyph index may be greater than the number of glyphs indicated, so guard the check with a preprocessor conditional.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-06 Jon Anderson <[email protected]>
+
+ [truetype] Fix regression in the incremental glyph loader.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): For incremental
+ fonts, the glyph index may be greater than the number of glyphs
+ indicated, so guard the check with a preprocessor conditional.
+
2015-02-06 Werner Lemberg <[email protected]>
[autofit] Fix potential memory leak.
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1425,6 +1425,7 @@
goto Exit;
}
+#ifndef FT_CONFIG_OPTION_INCREMENTAL
/* check glyph index */
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
{
@@ -1431,6 +1432,7 @@
error = FT_THROW( Invalid_Glyph_Index );
goto Exit;
}
+#endif
loader->glyph_index = glyph_index;