diff options
author | marha <marha@users.sourceforge.net> | 2014-06-26 09:46:14 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-06-26 09:52:19 +0200 |
commit | fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb (patch) | |
tree | a5d678a6e7030ab8114f97ba34ae2f3c37c0c4b3 /freetype/src/type1/t1load.c | |
parent | c30d5eefc96925b4bef781806c7a0114eca1b8e0 (diff) | |
download | vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.tar.gz vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.tar.bz2 vcxsrv-fba3b6d1979c1d1ad0d56d46fc2d787f111c07fb.zip |
Updated to freetype 2.5.3
Diffstat (limited to 'freetype/src/type1/t1load.c')
-rw-r--r-- | freetype/src/type1/t1load.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/freetype/src/type1/t1load.c b/freetype/src/type1/t1load.c index 1c834a17b..fd06432b5 100644 --- a/freetype/src/type1/t1load.c +++ b/freetype/src/type1/t1load.c @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2013 by */ +/* Copyright 1996-2014 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -377,8 +377,6 @@ if ( blend && blend->num_axis == num_coords ) { /* recompute the weight vector from the blend coordinates */ - error = FT_Err_Ok; - for ( n = 0; n < blend->num_designs; n++ ) { FT_Fixed result = 0x10000L; /* 1.0 fixed */ @@ -1107,7 +1105,7 @@ result = T1_ToFixedArray( parser, 6, temp, 3 ); - if ( result < 0 ) + if ( result < 6 ) { parser->root.error = FT_THROW( Invalid_File_Format ); return; @@ -1274,6 +1272,13 @@ { charcode = (FT_Int)T1_ToInt( parser ); T1_Skip_Spaces( parser ); + + /* protect against invalid charcode */ + if ( cur == parser->root.cursor ) + { + parser->root.error = FT_THROW( Unknown_File_Format ); + return; + } } cur = parser->root.cursor; @@ -2209,7 +2214,6 @@ if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY ) { FT_Int charcode, idx, min_char, max_char; - FT_Byte* char_name; FT_Byte* glyph_name; @@ -2224,6 +2228,9 @@ charcode = 0; for ( ; charcode < loader.encoding_table.max_elems; charcode++ ) { + FT_Byte* char_name; + + type1->encoding.char_index[charcode] = 0; type1->encoding.char_name [charcode] = (char *)".notdef"; |