From 95aeebf438f8249cc7645722cc37dbf408ecfe71 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Sat, 1 Aug 2009 00:30:13 +0900 Subject: [PATCH] ftobjs.c: Prevent an overflow in glyph index handling. --- ChangeLog | 7 +++++++ src/base/ftobjs.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a84558c6b..3a45c7e8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-07-31 suzuki toshiya + + ftobjs.c: Prevent an overflow in glyph index handling. + + * src/base/ftobjs.c (FT_Face_GetCharsOfVariant): + Improve the cast in comparison to avoid the truncation. + 2009-07-31 suzuki toshiya Improve the variable types in raccess_make_file_name(). diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 5bb4e4ec8..6325af36e 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -3297,7 +3297,7 @@ ((FT_Byte*)buffer)[0] = 0; if ( face && - glyph_index <= (FT_UInt)face->num_glyphs && + (FT_Long)glyph_index <= face->num_glyphs && FT_HAS_GLYPH_NAMES( face ) ) { FT_Service_GlyphDict service;