aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/base/ftbitmap.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/base/ftbitmap.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/base/ftbitmap.c')
-rw-r--r--freetype/src/base/ftbitmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/freetype/src/base/ftbitmap.c b/freetype/src/base/ftbitmap.c
index b700b28f2..5e1ab1a97 100644
--- a/freetype/src/base/ftbitmap.c
+++ b/freetype/src/base/ftbitmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (body). */
/* */
-/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
+/* Copyright 2004-2009, 2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -417,6 +417,10 @@
target->pitch = source->width + pad;
+ if ( target->pitch > 0 &&
+ target->rows > FT_ULONG_MAX / target->pitch )
+ return FT_Err_Invalid_Argument;
+
if ( target->rows * target->pitch > old_size &&
FT_QREALLOC( target->buffer,
old_size, target->rows * target->pitch ) )