[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.
This commit is contained in:
parent
b6cb4997e8
commit
416d87963f
|
@ -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>
|
2015-02-06 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[autofit] Fix potential memory leak.
|
[autofit] Fix potential memory leak.
|
||||||
|
|
|
@ -1425,12 +1425,14 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef FT_CONFIG_OPTION_INCREMENTAL
|
||||||
/* check glyph index */
|
/* check glyph index */
|
||||||
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
|
if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
|
||||||
{
|
{
|
||||||
error = FT_THROW( Invalid_Glyph_Index );
|
error = FT_THROW( Invalid_Glyph_Index );
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
loader->glyph_index = glyph_index;
|
loader->glyph_index = glyph_index;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue