* src/cff/cffgload.c (cff_decoder_prepare): Fix change from 2007-06-06.
diff --git a/ChangeLog b/ChangeLog
index b21cb8d..8ce3568 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
(ps_parser_load_field_table): Use `fields->array_max' instead of
T1_MAX_TABLE_ELEMENTS to limit the number of arguments.
+ * src/cff/cffgload.c (cff_decoder_prepare): Fix change from
+ 2007-06-06.
+
2006-06-17 Werner Lemberg <wl@gnu.org>
* src/tools/ftrandom.c (font_size): New global variable.
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 7d4c49a..8fef0ab 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -387,7 +387,7 @@
FT_Byte fd_index = cff_fd_select_get( &cff->fd_select, glyph_index );
- if ( fd_index > CFF_MAX_CID_FONTS )
+ if ( fd_index >= cff->num_subfonts )
{
FT_TRACE4(( "cff_decoder_prepare: invalid CID subfont index\n" ));
error = CFF_Err_Invalid_File_Format;