bugThe FreeType Project - Bugs: bug #47848, CFF FontMatrix overflow in parsing.

 
 

bug #47848: CFF FontMatrix overflow in parsing.

Submitted by:  None
Submitted on:  Wed 04 May 2016 09:23:16 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.6.4

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 17 May 2016 06:07:52 PM UTC, comment #1:

Fixed in git. Thanks for the report! While I've followed your idea in the patch, I've solved it differently.

Comparing acroread vs. evince, the demo document in the gs bug report is now displayed identically.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 04 May 2016 09:23:16 PM UTC, original submission:

There are problems in the CFF FontMatrix parsing code.

When converting to fixed point values, freetype uses the first matrix value's magnitude as an upper limit for the magnitudes of all other matrix values.

A matrix of the form [0.0025 -0.0096 0.0096 0.0025 0 0] will overflow on the second and third elements and be parsed as [0.0025 0 0 0.0025 0 0].

See ghostscript bug #691073 for more details:

http://bugs.ghostscript.com/show_bug.cgi?id=691073

I've attached an ugly patch which sort of works. It might be better to use the approach in cid_parse_font_matrix or the Type1 parser instead.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #37071:  weird-matrix.cff added by None (352B - 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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 May 2016 06:07:52 PM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.6.4
    Wed 04 May 2016 09:23:16 PM UTCNoneAttached File-=>Added weird-matrix.cff, #37071
      Attached File-=>Added 0001-Fix-problems-with-CFF-font-matrix-magnitudes.patch, #37072

    Back to the top


    Powered by Savane 3.1-cleanup1