Glyph index is out of range in cff_get_glyph_name.
authorJun Fang <jun_fang@foxitsoftware.com>
Tue, 14 Oct 2014 20:57:19 +0000 (13:57 -0700)
committerJun Fang <jun_fang@foxitsoftware.com>
Tue, 14 Oct 2014 20:57:19 +0000 (13:57 -0700)
Glyph index shall be less than number of glyphs.

BUG=418585
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/652363002

core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftobjs.c

index 96d460d..32c9ff7 100644 (file)
     if ( buffer && buffer_max > 0 )
       ((FT_Byte*)buffer)[0] = 0;
 
-    if ( face                                     &&
-         (FT_Long)glyph_index <= face->num_glyphs &&
+    if ( face                                    &&
+         (FT_Long)glyph_index < face->num_glyphs &&
          FT_HAS_GLYPH_NAMES( face )               )
     {
       FT_Service_GlyphDict  service;