aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/raster/ftrend1.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-10 16:12:27 +0100
committermarha <marha@users.sourceforge.net>2011-11-10 16:12:27 +0100
commit82e62cfbf79bc8c19946d034a0d5e14ce4fabb44 (patch)
tree16003af05805301a8a23d3ba0048e29eaf0fca73 /freetype/src/raster/ftrend1.c
parent7381bc7b9f63b2a6bf9ea9cbe04614adfc4b2369 (diff)
parentd783adea42f29bd7917929597ca1031b70587e1d (diff)
downloadvcxsrv-82e62cfbf79bc8c19946d034a0d5e14ce4fabb44.tar.gz
vcxsrv-82e62cfbf79bc8c19946d034a0d5e14ce4fabb44.tar.bz2
vcxsrv-82e62cfbf79bc8c19946d034a0d5e14ce4fabb44.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'freetype/src/raster/ftrend1.c')
-rw-r--r--freetype/src/raster/ftrend1.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/freetype/src/raster/ftrend1.c b/freetype/src/raster/ftrend1.c
index 2279533fd..9da1c203a 100644
--- a/freetype/src/raster/ftrend1.c
+++ b/freetype/src/raster/ftrend1.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2005, 2006 by */
+/* Copyright 1996-2003, 2005, 2006, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -176,6 +176,13 @@
width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
+
+ if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )
+ {
+ error = Raster_Err_Invalid_Argument;
+ goto Exit;
+ }
+
bitmap = &slot->bitmap;
memory = render->root.memory;