From 83fa9a9811e2c18cffd83a020757f7fb51ffddaa Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Apr 2010 14:12:40 +0000 Subject: Updated to following packages: freetype-2.3.12 --- freetype/src/type1/t1parse.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'freetype/src/type1/t1parse.c') diff --git a/freetype/src/type1/t1parse.c b/freetype/src/type1/t1parse.c index 1bef56bcf..2a762279f 100644 --- a/freetype/src/type1/t1parse.c +++ b/freetype/src/type1/t1parse.c @@ -397,15 +397,18 @@ T1_Skip_PS_Token( parser ); cur = parser->root.cursor; - if ( *cur == '\r' ) - { - cur++; - if ( *cur == '\n' ) - cur++; - } - else if ( *cur == '\n' ) - cur++; - else + + /* according to the Type1 spec, the first cipher byte must not be */ + /* an ASCII whitespace character code (blank, tab, carriage return */ + /* or line feed). We have seen Type 1 fonts with two line feed */ + /* characters... So skip now all whitespace character codes. */ + while ( cur < limit && + ( *cur == ' ' || + *cur == '\t' || + *cur == '\r' || + *cur == '\n' ) ) + ++cur; + if ( cur >= limit ) { FT_ERROR(( "T1_Get_Private_Dict:" " `eexec' not properly terminated\n" )); -- cgit v1.2.3