From 1e1cb06cf96f27e9a4fcd05a08aa7c0bc80ddbbd Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Fri, 3 Jul 2009 18:01:39 +0900 Subject: [PATCH] pcf: Fix a comparison between FT_Long and FT_ULong. --- ChangeLog | 7 +++++++ src/pcf/pcfread.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 838192765..70304fdb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-03 suzuki toshiya + + pcf: Fix a comparison between FT_Long and FT_ULong. + + * src/pcf/pcfread.c (pcf_get_bitmaps): Return an error + if PCF_Face->nemetrics is negative. + 2009-07-03 suzuki toshiya gxvalid: Guarantee `nFeatureFlags' size up to 32-bit. diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 9cce3f570..cdef433bc 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -692,7 +692,8 @@ THE SOFTWARE. FT_TRACE4(( " number of bitmaps: %d\n", nbitmaps )); - if ( nbitmaps != face->nmetrics ) + /* XXX: PCF_Face->nmetrics is singed FT_Long, see pcf.h */ + if ( face->nmetrics < 0 || nbitmaps != ( FT_ULong )face->nmetrics ) return PCF_Err_Invalid_File_Format; if ( FT_NEW_ARRAY( offsets, nbitmaps ) )