Blame SOURCES/freetype-2.4.11-CVE-2014-9660.patch

43e195
From af8346172a7b573715134f7a51e6c5c60fa7f2ab Mon Sep 17 00:00:00 2001
43e195
From: Werner Lemberg <wl@gnu.org>
43e195
Date: Sat, 22 Nov 2014 12:29:10 +0000
43e195
Subject: [bdf] Fix Savannah bug #43660.
43e195
43e195
* src/bdf/bdflib.c (_bdf_parse_glyphs) <"ENDFONT">: Check
43e195
`_BDF_GLYPH_BITS'.
43e195
---
43e195
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
43e195
index c128526..369c111 100644
43e195
--- a/src/bdf/bdflib.c
43e195
+++ b/src/bdf/bdflib.c
43e195
@@ -1549,6 +1549,14 @@
43e195
     /* Check for the ENDFONT field. */
43e195
     if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 )
43e195
     {
43e195
+      if ( p->flags & _BDF_GLYPH_BITS )
43e195
+      {
43e195
+        /* Missing ENDCHAR field. */
43e195
+        FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" ));
43e195
+        error = BDF_Err_Corrupted_Font_Glyphs;
43e195
+        goto Exit;
43e195
+      }
43e195
+
43e195
       /* Sort the glyphs by encoding. */
43e195
       ft_qsort( (char *)font->glyphs,
43e195
                 font->glyphs_used,
43e195
--
43e195
cgit v0.9.0.2