ref: af8346172a7b573715134f7a51e6c5c60fa7f2ab
parent: 42fcd6693ec7bd6ffc65ddc63e74287a65dda669
author: Werner Lemberg <[email protected]>
date: Sat Nov 22 08:29:10 EST 2014
[bdf] Fix Savannah bug #43660. * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check `_BDF_GLYPH_BITS'.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2014-11-22 Werner Lemberg <[email protected]>
+ [bdf] Fix Savannah bug #43660.
+
+ * src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
+ `_BDF_GLYPH_BITS'.
+
+2014-11-22 Werner Lemberg <[email protected]>
+
[type42] Allow only embedded TrueType fonts.
This is a follow-up to Savannah bug #43659.
--- 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,