summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:19 +0900
committersuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2009-07-03 18:01:19 +0900
commit4053559b198152a7cfc4f1851a0b14c9af700f8c (patch)
treef014c3eb2d248a4ba241594af0f141aca02d796d
parent4b431ddca8a5ae66b63b60c3e3f2aac0c90c9023 (diff)
downloadfreetype2-4053559b198152a7cfc4f1851a0b14c9af700f8c.tar.gz
ftobjs.c: Prevent an overflow in glyph index handling.
-rw-r--r--ChangeLog7
-rw-r--r--src/base/ftobjs.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d35b0f632..faf9087b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2009-07-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ 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-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
Improve the variable types in raccess_make_file_name().
* src/base/ftrfork.c (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;