[cff] Ignore unknown operators in charstrings.

Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.

* src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing
message for unknown operators and continue instead of exiting with a
syntax error.
This commit is contained in:
Werner Lemberg 2011-02-01 07:36:27 +01:00
Родитель 18931a5a5d
Коммит 75df70600f
2 изменённых файлов: 14 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,12 @@
2011-02-01 Werner Lemberg <wl@gnu.org>
[cff] Ignore unknown operators in charstrings.
Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>.
* 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 <wl@gnu.org>
[truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also.

Просмотреть файл

@ -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];