bugThe FreeType Project - Bugs: bug #46188, Malformed GX font causes...

 
 

bug #46188: Malformed GX font causes TT_Vary_Apply_Glyph_Deltas to leak sharedpoints.

Submitted by:  bungeman <bungeman>
Submitted on:  Mon 12 Oct 2015 08:26:49 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.6.2

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 13 Oct 2015 06:15:06 AM UTC, comment #1:

Fixed in git. Thanks for the report!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 12 Oct 2015 08:26:49 PM UTC, original submission:

When using the attached malformed font file with FreeType built at b9880aa0f8f52accc9074334f9e9f962b1b5a8e6 with asan/lsan a leak is reported

ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 1 object(s) allocated from:

__interceptor_malloc src/llvm_all/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
ft_mem_qalloc src/freetype2/src/base/ftutil.c:76:15
ft_mem_alloc src/freetype2/src/base/ftutil.c:55:0
ft_mem_qrealloc src/freetype2/src/base/ftutil.c:146:0
ft_mem_realloc src/freetype2/src/base/ftutil.c:102:13
ft_var_readpackedpoints src/freetype2/src/truetype/ttgxvar.c:158:10
TT_Vary_Apply_Glyph_Deltas src/freetype2/src/truetype/ttgxvar.c:1870:22
load_truetype_glyph src/freetype2/src/truetype/ttgload.c:1554:17
TT_Load_Glyph src/freetype2/src/truetype/ttgload.c:2493:13
tt_glyph_load src/freetype2/src/truetype/ttdriver.c:396:0
FT_Load_Glyph src/freetype2/src/base/ftobjs.c:731:15
af_loader_load_g src/freetype2/src/autofit/afloader.c:102:13
af_loader_load_glyph src/freetype2/src/autofit/afloader.c:400:0
af_autofitter_load_glyph src/freetype2/src/autofit/afmodule.c:372:0
FT_Load_Glyph src/freetype2/src/base/ftobjs.c:722:19

It appears that ft_var_readpackedpoints is allocating an array and returning it to TT_Vary_Apply_Glyph_Deltas which assigns it to the variable sharedpoints, but TT_Vary_Apply_Glyph_Deltas might not free this array in certain error conditions.

bungeman <bungeman>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35170:  f778fc875f00286b3daffb171363bd014f7d6119 added by bungeman (17KiB - 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)
  • -unavailable- added by bungeman (Submitted the item)
  •  

    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
    Tue 13 Oct 2015 06:15:06 AM UTCwlPlanned ReleaseNone=>2.6.2
    Tue 13 Oct 2015 06:15:05 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
    Mon 12 Oct 2015 08:26:49 PM UTCbungemanAttached File-=>Added f778fc875f00286b3daffb171363bd014f7d6119, #35170

    Back to the top


    Powered by Savane 3.1-cleanup1