shithub: freetype+ttf2subf

Download patch

ref: 2cba64d30d737334992931eae38beabaf6ea0e08
parent: 9f36499fa72f2f67ab667870e70011ac1c5460d7
author: Werner Lemberg <[email protected]>
date: Mon Apr 28 04:51:07 EDT 2003

* src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
`glyph_index'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,24 +1,29 @@
+2003-04-28  David Turner  <[email protected]>
+
+	* src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
+	`glyph_index'.
+
 2003-04-25:  Graham Asher  <[email protected]>
 
 	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  <[email protected]>
 
-	* 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  <[email protected]>
--- 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;