aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type1/t1load.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/type1/t1load.c')
-rw-r--r--freetype/src/type1/t1load.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/freetype/src/type1/t1load.c b/freetype/src/type1/t1load.c
index 346812b08..3ed65c2ec 100644
--- a/freetype/src/type1/t1load.c
+++ b/freetype/src/type1/t1load.c
@@ -1211,7 +1211,7 @@
char* notdef = (char *)".notdef";
- T1_Add_Table( char_table, n, notdef, 8 );
+ (void)T1_Add_Table( char_table, n, notdef, 8 );
}
/* Now we need to read records of the form */
@@ -1596,6 +1596,11 @@
}
T1_Skip_PS_Token( parser );
+ if ( parser->root.cursor >= limit )
+ {
+ error = FT_THROW( Invalid_File_Format );
+ goto Fail;
+ }
if ( parser->root.error )
return;
@@ -1604,7 +1609,7 @@
FT_PtrDist len;
- if ( cur + 1 >= limit )
+ if ( cur + 2 >= limit )
{
error = FT_THROW( Invalid_File_Format );
goto Fail;