cpp-conditionalize too large property value check for LP64 systems,

because it is always false on 16bit systems.
This commit is contained in:
suzuki toshiya 2017-09-11 19:20:24 +09:00
parent c122d3172c
commit fbde20e94b
1 changed files with 4 additions and 0 deletions

View File

@ -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.