From 2cba64d30d737334992931eae38beabaf6ea0e08 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 28 Apr 2003 08:51:07 +0000 Subject: [PATCH] * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for `glyph_index'. --- ChangeLog | 25 +++++++++++++++---------- src/base/ftobjs.c | 2 +- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ad95a216..7b06fd654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,24 +1,29 @@ +2003-04-28 David Turner + + * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for + `glyph_index'. + 2003-04-25: Graham Asher Added the optional unpatented hinting system for TrueType. It - allows typefaces which need hinting to produce correct glyph forms + allows typefaces which need hinting to produce correct glyph forms (e.g., Chinese typefaces from Dynalab) to work acceptably without infringing Apple patents. This system is compiled only if TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in ftoption.h. - * include/freetype/ttunpat.h: added header file ttunpat.h defining - FT_PARAM_TAG_UNPATENTED_HINTING. + * include/freetype/ttunpat.h: added header file ttunpat.h defining + FT_PARAM_TAG_UNPATENTED_HINTING. * include/freetype/config/ftheader.h: Added macro FT_UNPATENTED_H - to use when including new header ttunpat.h. + to use when including new header ttunpat.h. * include/freetype/config/ftoption.h: Added configuration macros - (not defined, but in comments) for the unpatented hinting system. + (not defined, but in comments) for the unpatented hinting system. * include/freetype/internal/tttypes.h: If unpatented hinting is - compiled the TrueType face object acquires a new element, - "FT_Bool unpatented_hinting". + compiled the TrueType face object acquires a new element, + "FT_Bool unpatented_hinting". * src/truetype/ttinterp.c, ttobjs.c, ttobjs.h: Added the unpatented hinting system, which is compiled only if @@ -50,9 +55,9 @@ 2003-04-24 David Turner - * src/pcf/pcfread.c (pcf_load_font): fixed the computation of - face->num_glyphs, this required increase the value by 1 to respect - the convention that gindex 0 always corresponds to the "missing + * src/pcf/pcfread.c (pcf_load_font): Fixed the computation of + face->num_glyphs. We must increase the value by 1 to respect the + convention that glyph index 0 always corresponds to the "missing glyph". 2003-04-24 Werner Lemberg diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index ef4a7f6a1..42e06790c 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -466,7 +466,7 @@ if ( !face || !face->size || !face->glyph ) return FT_Err_Invalid_Face_Handle; - if ( glyph_index > (FT_UInt)face->num_glyphs ) + if ( glyph_index >= (FT_UInt)face->num_glyphs ) return FT_Err_Invalid_Argument; slot = face->glyph;