ref: 75df70600f9ce424264da64eb3fd8d79ce2f1b98
parent: 18931a5a5dacf1a0bb2c54eed2bf4c607245f893
author: Werner Lemberg <[email protected]>
date: Tue Feb 1 02:36:27 EST 2011
[cff] Ignore unknown operators in charstrings. Patch suggested by Miles.Lau <[email protected]>. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing message for unknown operators and continue instead of exiting with a syntax error.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2011-02-01 Werner Lemberg <[email protected]>
+ [cff] Ignore unknown operators in charstrings.
+ Patch suggested by Miles.Lau <[email protected]>.
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
+ message for unknown operators and continue instead of exiting with a
+ syntax error.
+
+2011-02-01 Werner Lemberg <[email protected]>
+
[truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.
* src/truetype/ttgload.c (tt_loader_init): Handle
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -4,8 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
-/* 2010 by */
+/* Copyright 1996-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -1159,8 +1158,8 @@
op = cff_op_flex1;
break;
default:
- /* decrement ip for syntax error message */
- ip--;
+ FT_TRACE4(( " unknown op (12, %d)\n", v ));
+ break;
}
}
break;
@@ -1213,11 +1212,12 @@
op = cff_op_hvcurveto;
break;
default:
+ FT_TRACE4(( " unknown op (%d)\n", v ));
break;
}
if ( op == cff_op_unknown )
- goto Syntax_Error;
+ continue;
/* check arguments */
req_args = cff_argument_counts[op];