summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/pcf/pcfread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/pcf/pcfread.c')
-rw-r--r--src/3rdparty/freetype/src/pcf/pcfread.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/3rdparty/freetype/src/pcf/pcfread.c b/src/3rdparty/freetype/src/pcf/pcfread.c
index b9123cf57..8e04c57b3 100644
--- a/src/3rdparty/freetype/src/pcf/pcfread.c
+++ b/src/3rdparty/freetype/src/pcf/pcfread.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -48,7 +48,7 @@ THE SOFTWARE.
#define FT_COMPONENT trace_pcfread
-#if defined( FT_DEBUG_LEVEL_TRACE )
+#ifdef FT_DEBUG_LEVEL_TRACE
static const char* const tableNames[] =
{
"prop", "accl", "mtrcs", "bmps", "imtrcs",
@@ -152,7 +152,7 @@ THE SOFTWARE.
break;
}
-#if defined( FT_DEBUG_LEVEL_TRACE )
+#ifdef FT_DEBUG_LEVEL_TRACE
{
FT_UInt i, j;
@@ -470,7 +470,11 @@ THE SOFTWARE.
if ( nprops & 3 )
{
i = 4 - ( nprops & 3 );
- FT_Stream_Skip( stream, i );
+ if ( FT_STREAM_SKIP( i ) )
+ {
+ error = PCF_Err_Invalid_Stream_Skip;
+ goto Bail;
+ }
}
if ( PCF_BYTE_ORDER( format ) == MSBFirst )
@@ -623,7 +627,7 @@ THE SOFTWARE.
metrics = face->metrics;
for ( i = 0; i < nmetrics; i++ )
{
- pcf_get_metric( stream, format, metrics + i );
+ error = pcf_get_metric( stream, format, metrics + i );
metrics[i].bits = 0;