diff --git a/ChangeLog b/ChangeLog index 20a79d0c5..aa2828997 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-11-22 Werner Lemberg + + [bdf] Fix Savannah bug #43660. + + * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check + `_BDF_GLYPH_BITS'. + 2014-11-22 Werner Lemberg [type42] Allow only embedded TrueType fonts. diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c index c12852694..369c111f9 100644 --- a/src/bdf/bdflib.c +++ b/src/bdf/bdflib.c @@ -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,