diff options
Diffstat (limited to 'freetype/builds/mac/ftmac.c')
-rw-r--r-- | freetype/builds/mac/ftmac.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/freetype/builds/mac/ftmac.c b/freetype/builds/mac/ftmac.c index c45546cee..6adf800a4 100644 --- a/freetype/builds/mac/ftmac.c +++ b/freetype/builds/mac/ftmac.c @@ -5,7 +5,7 @@ /* Mac FOND support. Written by just@letterror.com. */ /* Heavily Fixed by mpsuzuki, George Williams and Sean McBride */ /* */ -/* Copyright 1996-2018 by */ +/* Copyright (C) 1996-2019 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -780,9 +780,10 @@ typedef short ResourceIndex; style = (StyleTable*)p; p += sizeof ( StyleTable ); string_count = EndianS16_BtoN( *(short*)(p) ); + string_count = FT_MIN( 64, string_count ); p += sizeof ( short ); - for ( i = 0; i < string_count && i < 64; i++ ) + for ( i = 0; i < string_count; i++ ) { names[i] = p; p += names[i][0]; @@ -799,7 +800,7 @@ typedef short ResourceIndex; ps_name[ps_name_len] = 0; } if ( style->indexes[face_index] > 1 && - style->indexes[face_index] <= FT_MIN( string_count, 64 ) ) + style->indexes[face_index] <= string_count ) { unsigned char* suffixes = names[style->indexes[face_index] - 1]; |