From bcc750e511a5f7c6f4284fed6cfbaf458cff8f37 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 16 May 2008 04:50:00 +0000 Subject: [PATCH] * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : `closepath' without a path is a no-op, not an error (cf. the PS reference manual). Reported by Martin McBride. --- ChangeLog | 8 ++++++++ src/psaux/t1decode.c | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7021bee7..f6c7c0343 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-15 Werner Lemberg + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) + : `closepath' without a path is a no-op, not an error + (cf. the PS reference manual). + + Reported by Martin McBride. + 2008-05-15 Werner Lemberg * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated. diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index f790643f9..550ba6414 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -4,7 +4,7 @@ /* */ /* PostScript Type 1 decoding routines (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 2000-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, */ @@ -1062,10 +1062,11 @@ case op_closepath: FT_TRACE4(( " closepath" )); - close_contour( builder ); - if ( !( builder->parse_state == T1_Parse_Have_Path || - builder->parse_state == T1_Parse_Have_Moveto ) ) - goto Syntax_Error; + /* if there is no path, `closepath' is a no-op */ + if ( builder->parse_state == T1_Parse_Have_Path || + builder->parse_state == T1_Parse_Have_Moveto ) + close_contour( builder ); + builder->parse_state = T1_Parse_Have_Width; break;