[cache] Check the face filled by FTC_Manager_LookupFace().

This commit is contained in:
suzuki toshiya 2009-09-24 14:30:40 +09:00
parent e2184505b1
commit 4e0c9ee155
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2009-09-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[cache] Check the face filled by FTC_Manager_LookupFace().
* src/cache/ftcbasic.c (ftc_basic_family_get_count): Return
immediately if FTC_Manager_LookupFace() fills face by NULL.
Such case can occur when the code is optimized by GCC-4.2.x.
2009-09-23 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.

View File

@ -142,6 +142,9 @@
error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,
&face );
if ( error || !face )
return result;
if ( (FT_ULong)face->num_glyphs > FT_UINT_MAX || 0 > face->num_glyphs )
{
FT_TRACE1(( "ftc_basic_family_get_count: too large number of glyphs " ));