summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2017-09-11 18:41:52 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2017-09-13 17:11:12 +0900
commitdf9094492d38c5e9a03880ed0ec273f9ccd182f1 (patch)
treea86a1530cf839ef9d8ab610734dfa21696024bcf
parent12ef16a44b69ac2cf47d088c09cbb629bd275573 (diff)
downloadfreetype2-df9094492d38c5e9a03880ed0ec273f9ccd182f1.tar.gz
cpp-conditionalize a check for int width or height > 64k, because it is always false on 16bit system.
-rw-r--r--src/raster/ftrend1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 185a7f6fc..761662691 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -166,11 +166,13 @@
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
}
+#if FT_UINT_MAX > 0xFFFFUL
if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )
{
error = FT_THROW( Invalid_Argument );
goto Exit;
}
+#endif
bitmap = &slot->bitmap;
memory = render->root.memory;