freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] int-not32-changes-2017 fbde20e 14/25: cpp-conditionalize too


From: suzuki toshiya
Subject: [freetype2] int-not32-changes-2017 fbde20e 14/25: cpp-conditionalize too large property value check for LP64 systems,
Date: Wed, 13 Sep 2017 04:15:06 -0400 (EDT)

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

    cpp-conditionalize too large property value check for LP64 systems,
    because it is always false on 16bit systems.
---
 src/pcf/pcfdrivr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 169f75e..bad6e06 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -179,6 +179,7 @@ THE SOFTWARE.
     }
 
   Exit:
+#if FT_ULONG_MAX > 0xFFFFFFFFUL
     if ( charcode > 0xFFFFFFFFUL )
     {
       FT_TRACE1(( "pcf_cmap_char_next: charcode 0x%x > 32bit API" ));
@@ -186,6 +187,7 @@ THE SOFTWARE.
       /* XXX: result should be changed to indicate an overflow error */
     }
     else
+#endif
       *acharcode = (FT_UInt32)charcode;
     return result;
   }
@@ -625,12 +627,14 @@ THE SOFTWARE.
       }
       else
       {
+#if FT_ULONG_MAX > 0xFFFFFFFFUL
         if ( prop->value.l > 0x7FFFFFFFL          ||
              prop->value.l < ( -1 - 0x7FFFFFFFL ) )
         {
           FT_TRACE1(( "pcf_get_bdf_property:" ));
           FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
         }
+#endif
 
         /*
          *  The PCF driver loads all properties as signed integers.



reply via email to

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