diff options
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c b/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c index faaae832948..311f098e3a8 100644 --- a/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c +++ b/Build/source/libs/freetype2/freetype-src/src/base/ftoutln.c @@ -16,12 +16,11 @@ */ -#include <ft2build.h> -#include FT_OUTLINE_H -#include FT_INTERNAL_OBJECTS_H -#include FT_INTERNAL_CALC_H -#include FT_INTERNAL_DEBUG_H -#include FT_TRIGONOMETRY_H +#include <freetype/ftoutln.h> +#include <freetype/internal/ftobjs.h> +#include <freetype/internal/ftcalc.h> +#include <freetype/internal/ftdebug.h> +#include <freetype/fttrigon.h> /************************************************************************** @@ -275,7 +274,7 @@ first = (FT_UInt)last + 1; } - FT_TRACE5(( "FT_Outline_Decompose: Done\n", n )); + FT_TRACE5(( "FT_Outline_Decompose: Done\n" )); return FT_Err_Ok; Invalid_Outline: @@ -1061,6 +1060,11 @@ if ( cbox.xMin == cbox.xMax || cbox.yMin == cbox.yMax ) return FT_ORIENTATION_NONE; + /* Reject values large outlines. */ + if ( cbox.xMin < -0x1000000L || cbox.yMin < -0x1000000L || + cbox.xMax > 0x1000000L || cbox.yMax > 0x1000000L ) + return FT_ORIENTATION_NONE; + xshift = FT_MSB( (FT_UInt32)( FT_ABS( cbox.xMax ) | FT_ABS( cbox.xMin ) ) ) - 14; xshift = FT_MAX( xshift, 0 ); |