aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type1/t1afm.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/type1/t1afm.c')
-rw-r--r--freetype/src/type1/t1afm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/freetype/src/type1/t1afm.c b/freetype/src/type1/t1afm.c
index 5aea58820..16dc471c5 100644
--- a/freetype/src/type1/t1afm.c
+++ b/freetype/src/type1/t1afm.c
@@ -50,13 +50,17 @@
/* read a glyph name and return the equivalent glyph index */
static FT_Int
t1_get_index( const char* name,
- FT_UInt len,
+ FT_Offset len,
void* user_data )
{
T1_Font type1 = (T1_Font)user_data;
FT_Int n;
+ /* PS string/name length must be < 16-bit */
+ if ( ( len - 0xFFFFU ) > 0 )
+ return 0;
+
for ( n = 0; n < type1->num_glyphs; n++ )
{
char* gname = (char*)type1->glyph_names[n];