Hi,

A Mac user provided to me a font suitcase file (OptaneCompactExtrabold.fam) that crashes FreeType (2.3.5 and latest CVS) when referencing face index #3. I tracked it down to the first call in FT_New_Face_From_SFNT (ftmac.c).

   sfnt = GetResource( FT_MAKE_TAG( 's', 'f', 'n', 't' ), sfnt_id );
   if ( ResError() )
     return FT_Err_Invalid_Handle;

GetResource would return 0, but ResError did not return true. Checking for a NULL handle was required to get FreeType to skip it without crashing.

   if ( sfnt == NULL || ResError() )
     return FT_Err_Invalid_Handle;

I can now access the 7 faces that is reported to be inside with this change.
Hope that is helpful.

Deron



_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to