* src/type1/t1load.c (parse_subrs, parse_charstrings): Protect
against too small binary data strings.

* src/bdf/bdflib.c (_bdf_parse_glyphs): Check `STARTCHAR' better.
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 93061bb..8dade71 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1537,6 +1537,12 @@
 
       s = _bdf_list_join( &p->list, ' ', &slen );
 
+      if ( !s )
+      {
+        error = BDF_Err_Invalid_File_Format;
+        goto Exit;
+      }
+
       if ( FT_NEW_ARRAY( p->glyph_name, slen + 1 ) )
         goto Exit;