aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type1/t1load.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-12 10:33:22 +0100
committermarha <marha@users.sourceforge.net>2012-03-12 10:33:22 +0100
commit41bd254198b8b879a562a85f7dc868c3c0f7fbc1 (patch)
tree3db49b4d73b8c4c734c1382ab5469a4f9f8baf93 /freetype/src/type1/t1load.c
parentb91444584a64f4f7b3eaeee05ef36ac53691fb24 (diff)
downloadvcxsrv-41bd254198b8b879a562a85f7dc868c3c0f7fbc1.tar.gz
vcxsrv-41bd254198b8b879a562a85f7dc868c3c0f7fbc1.tar.bz2
vcxsrv-41bd254198b8b879a562a85f7dc868c3c0f7fbc1.zip
Updated to freetype-2.4.9
Diffstat (limited to 'freetype/src/type1/t1load.c')
-rw-r--r--freetype/src/type1/t1load.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/freetype/src/type1/t1load.c b/freetype/src/type1/t1load.c
index 1451fe587..a0adfd490 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 )