diff options
author | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
commit | 485b633824020c557eb60258e1d36975c8c44770 (patch) | |
tree | f48baf73d5a7ae814aae825e7b1405189eab9f0a /freetype/src/type1/t1load.c | |
parent | c84235ee0d9940e6a779ec306e615603b58a79f2 (diff) | |
parent | 41bd254198b8b879a562a85f7dc868c3c0f7fbc1 (diff) | |
download | vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.gz vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.bz2 vcxsrv-485b633824020c557eb60258e1d36975c8c44770.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
freetype/src/base/ftrfork.c
freetype/src/cff/cffpic.c
freetype/src/pfr/pfrobjs.c
freetype/src/winfonts/winfnt.c
Diffstat (limited to 'freetype/src/type1/t1load.c')
-rw-r--r-- | freetype/src/type1/t1load.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/freetype/src/type1/t1load.c b/freetype/src/type1/t1load.c index dc241fc18..ff26729e5 100644 --- a/freetype/src/type1/t1load.c +++ b/freetype/src/type1/t1load.c @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1075,8 +1075,8 @@ /* and `/CharStrings' dictionaries. */ static void - parse_font_matrix( T1_Face face, - T1_Loader loader ) + t1_parse_font_matrix( T1_Face face, + T1_Loader loader ) { T1_Parser parser = &loader->parser; FT_Matrix* matrix = &face->type1.font_matrix; @@ -1099,7 +1099,7 @@ if ( temp_scale == 0 ) { - FT_ERROR(( "parse_font_matrix: invalid font matrix\n" )); + FT_ERROR(( "t1_parse_font_matrix: invalid font matrix\n" )); parser->root.error = T1_Err_Invalid_File_Format; return; } @@ -1388,7 +1388,8 @@ /* If the next token isn't `dup' we are done. */ - if ( ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) + if ( parser->root.cursor + 4 < parser->root.limit && + ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 ) break; T1_Skip_PS_Token( parser ); /* `dup' */ @@ -1407,7 +1408,8 @@ return; T1_Skip_Spaces ( parser ); - if ( ft_strncmp( (char*)parser->root.cursor, "put", 3 ) == 0 ) + if ( parser->root.cursor + 4 < parser->root.limit && + ft_strncmp( (char*)parser->root.cursor, "put", 3 ) == 0 ) { T1_Skip_PS_Token( parser ); /* skip `put' */ T1_Skip_Spaces ( parser ); @@ -1772,7 +1774,7 @@ #include "t1tokens.h" /* now add the special functions... */ - T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix, + T1_FIELD_CALLBACK( "FontMatrix", t1_parse_font_matrix, T1_FIELD_DICT_FONTDICT ) T1_FIELD_CALLBACK( "Encoding", parse_encoding, T1_FIELD_DICT_FONTDICT ) |