[bdf] Fix Savannah bug #43660.

* src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
`_BDF_GLYPH_BITS'.
This commit is contained in:
Werner Lemberg 2014-11-22 13:29:10 +01:00
parent 42fcd6693e
commit af8346172a
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2014-11-22 Werner Lemberg <wl@gnu.org>
[bdf] Fix Savannah bug #43660.
* src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
`_BDF_GLYPH_BITS'.
2014-11-22 Werner Lemberg <wl@gnu.org>
[type42] Allow only embedded TrueType fonts.

View File

@ -1555,6 +1555,14 @@
/* Check for the ENDFONT field. */
if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 )
{
if ( p->flags & _BDF_GLYPH_BITS )
{
/* Missing ENDCHAR field. */
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" ));
error = FT_THROW( Corrupted_Font_Glyphs );
goto Exit;
}
/* Sort the glyphs by encoding. */
ft_qsort( (char *)font->glyphs,
font->glyphs_used,