* src/cid/cidparse.c (cid_parser_new): Reject Type 42 CID-keyed fonts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/ChangeLog b/ChangeLog
index 4055424..8203510 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-07 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidparse.c (cid_parser_new): Reject Type 42 CID-keyed
+ fonts.
+
2007-01-06 Werner Lemberg <wl@gnu.org>
* src/cff/cffload.c (cff_index_init): Remove unused variable.
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index ac56363..3d342f2 100644
--- 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;
}