shithub: freetype+ttf2subf

Download patch

ref: e6b6f3733ebf4b7f95eb56180f79dbacd21c8d50
parent: be5f797f5b36542bccfc5664e2a2b293e0eb3084
author: Werner Lemberg <[email protected]>
date: Sat Jan 6 19:06:47 EST 2007

* src/cid/cidparse.c (cid_parser_new): Reject Type 42 CID-keyed
fonts.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-07  Werner Lemberg  <[email protected]>
+
+	* src/cid/cidparse.c (cid_parser_new): Reject Type 42 CID-keyed
+	fonts.
+
 2007-01-06  Werner Lemberg  <[email protected]>
 
 	* src/cff/cffload.c (cff_index_init): Remove unused variable.
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    CID-keyed Type1 parser (body).                                       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -183,6 +183,11 @@
       goto Again;
 
   Exit:
+    if ( !parser->postscript )
+    {
+      FT_TRACE2(( "[not a valid CID-keyed font]\n" ));
+      error = CID_Err_Unknown_File_Format;
+    }
     return error;
   }