freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] Segfault with otf and face_index == -1


From: David Turner
Subject: Re: [ft-devel] Segfault with otf and face_index == -1
Date: Mon, 17 Oct 2005 23:18:35 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hello,

thanks, I've commited a fix, which is to never call FT_New_GlyphSlot and FT_New_Size
within FT_Open_Face when face_index is < 0.

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)


Ville Syrjälä a écrit :

Hello,

When FT_New_Face() is called for an otf font with face_index == -1 freetype segfaults.

The backtrace looks like this:
#0  0xb557a46c in cff_slot_init (slot=0x8057070) at cffobjs.c:304
#1  0xb55601f8 in ft_glyphslot_init (slot=0x8057070) at ftobjs.c:225
#2  0xb5560550 in FT_New_GlyphSlot (face=0x8056ca0, aslot=0xbfffdda8) at 
ftobjs.c:362
#3  0xb5561f84 in FT_Open_Face (library=0x8050b18, args=0xbfffde00, 
face_index=-1, aface=0xbfffde4c) at ftobjs.c:1685
#4  0xb5561039 in FT_New_Face (library=0x8050b18, pathname=0xbffff34b

And it segfaults here:
 FT_LOCAL_DEF( FT_Error )
 cff_slot_init( FT_GlyphSlot  slot )
 {
   CFF_Face          face     = (CFF_Face)slot->face;
   CFF_Font          font     = (CFF_FontRec *)face->extra.data;
->   PSHinter_Service  pshinter = (PSHinter_Service)font->pshinter;

The problem is that with face_index == -1 cff_face_init() returns before face->extra.data and cff->pshinter are set.

No patch since I'm not sure what the proper fix would be...






reply via email to

[Prev in Thread] Current Thread [Next in Thread]