* src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for `glyph_index'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/ChangeLog b/ChangeLog
index 4ad95a2..7b06fd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,24 +1,29 @@
+2003-04-28 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
+ `glyph_index'.
+
2003-04-25: Graham Asher <graham.asher@btinternet.com>
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 <david@freetype.org>
- * 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 <wl@gnu.org>
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index ef4a7f6..42e0679 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;