From fbde20e94bcb2ab8c9c2e2c58a00b9d61a117280 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Mon, 11 Sep 2017 19:20:24 +0900 Subject: 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 169f75e95..bad6e0617 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. -- cgit v1.2.1