aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type1
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/type1')
-rw-r--r--freetype/src/type1/t1driver.c5
-rw-r--r--freetype/src/type1/t1load.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/freetype/src/type1/t1driver.c b/freetype/src/type1/t1driver.c
index 1b175866c..b9798d500 100644
--- a/freetype/src/type1/t1driver.c
+++ b/freetype/src/type1/t1driver.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
-/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013 by */
+/* Copyright 1996-2004, 2006, 2007, 2009, 2011, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -557,9 +557,6 @@
if ( value && value_len >= retval )
*((FT_Long *)value) = type1->font_info.italic_angle;
break;
-
- default:
- break;
}
return retval;
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;