Commit 504645ed5ba7540bea4a623ba8489f6502891908

Werner Lemberg 2008-05-14T23:26:20

* src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array which contain a single but empty entry. This is technically invalid (since it must end with `return', but...) Reported by Martin McBride.

diff --git a/ChangeLog b/ChangeLog
index f68f28d..3fbb692 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-15  Werner Lemberg  <wl@gnu.org>
+
+	* src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array
+	which contain a single but empty entry.  This is technically
+	invalid (since it must end with `return', but...)
+
+	Reported by Martin McBride.
+
 2008-05-14  Werner Lemberg  <wl@gnu.org>
 
 	Finish fix of scaling bug of CID-keyed CFF subfonts.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 55177ee..8c1cb9a 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (body).                                           */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by             */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by       */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1397,7 +1397,7 @@
         FT_Byte*  temp;
 
 
-        if ( size <= face->type1.private_dict.lenIV )
+        if ( size < face->type1.private_dict.lenIV )
         {
           error = T1_Err_Invalid_File_Format;
           goto Fail;