[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.
2.6.5
Jon Anderson 10 years ago committed by Werner Lemberg
parent b6cb4997e8
commit 416d87963f
  1. 8
      ChangeLog
  2. 2
      src/truetype/ttgload.c

@ -1,3 +1,11 @@
2015-02-06 Jon Anderson <jon@websupergoo.com>
[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 <wl@gnu.org>
[autofit] Fix potential memory leak.

@ -1425,12 +1425,14 @@
goto Exit;
}
#ifndef FT_CONFIG_OPTION_INCREMENTAL
/* check glyph index */
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
{
error = FT_THROW( Invalid_Glyph_Index );
goto Exit;
}
#endif
loader->glyph_index = glyph_index;

Loading…
Cancel
Save