bugThe FreeType Project - Bugs: bug #40997, winfont driver overrides...

 
 

bug #40997: winfont driver overrides face_flags (EXTERNAL_STREAM)

Submitted by:  None
Submitted on:  Wed 25 Dec 2013 12:26:56 AM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.5.3

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 25 Dec 2013 07:54:50 AM UTC, comment #1:

Fixed in git. Thanks for the report!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 25 Dec 2013 12:26:56 AM UTC, original submission:

When using external streams and windows font files, the stream is closed by freetype anyway - which leads to a double-free error when the external system closes the stream itself.

In src/winfonts/winfnt.c:746 the face_flags member is overridden, therefor the flag FT_FACE_FLAG_EXTERNAL_STREAM (been set in src/base/ftobjs.c:1169) is removed.

It works with truetype fonts (I assume because in src/truetype/ttobjs.c the face_flags is never completely overridden), but not with windows fonts (.fon).

I added a SDL_ttf-based example (uses SDL-based streams as input to freetype).
The program crashes with a double-free error when the stream that SDL_ttf created is closed by SDL_ttf.

Used freetype 2.5.2 and sdl-ttf 2.0.10

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #30088:  freetype-SDL-bug.c added by None (677B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 25 Dec 2013 07:54:50 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.5.3
    Wed 25 Dec 2013 12:26:56 AM UTCNoneAttached File-=>Added freetype-SDL-bug.c, #30088

    Back to the top


    Powered by Savane 3.1-cleanup1