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: Ville Syrjälä
Subject: Re: [ft-devel] Segfault with otf and face_index == -1
Date: Tue, 18 Oct 2005 00:58:41 +0300
User-agent: Mutt/1.4.2i

On Mon, Oct 17, 2005 at 11:18:35PM +0200, David Turner wrote:
> 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,

It works. Thanks.

> 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...
> >
> > 
> >
> 

-- 
Ville Syrjälä
address@hidden
http://www.sci.fi/~syrjala/




reply via email to

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