freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] int-not32-changes-2017 df90944 11/25: cpp-conditionalize a c


From: suzuki toshiya
Subject: [freetype2] int-not32-changes-2017 df90944 11/25: cpp-conditionalize a check for int width or height > 64k, because it is always false on 16bit system.
Date: Wed, 13 Sep 2017 04:15:05 -0400 (EDT)

branch: int-not32-changes-2017
commit df9094492d38c5e9a03880ed0ec273f9ccd182f1
Author: suzuki toshiya <address@hidden>
Commit: suzuki toshiya <address@hidden>

    cpp-conditionalize a check for int width or height > 64k, because it is 
always false on 16bit system.
---
 src/raster/ftrend1.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 185a7f6..7616626 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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]