bugThe FreeType Project - Bugs: bug #31545, UVS support is broken since...

 
 

bug #31545: UVS support is broken since 2010-07-04

Submitted by:  suzuki toshiya <mpsuzuki>
Submitted on:  Thu 04 Nov 2010 02:23:02 PM UTC  
 
Severity: 4 - ImportantItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: suzuki toshiya <mpsuzuki>Open/Closed: Closed
Planned Release: 2.4.4

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 04 Nov 2010 02:30:55 PM UTC, comment #1:

Fixed on GIT.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Thu 04 Nov 2010 02:23:02 PM UTC, original submission:

I'm quite sorry, UVS support is broken since 2010-07-04,
the commit putting max limitation of charmap cache.

For the function `find_variant_selector_charmap' retrieving
UVS cmap, following modification was introduced.

diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 11efc75..8551693 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1046,6 +1062,14 @@
if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&
FT_Get_CMap_Format( cur[0] ) == 14 )
+#ifdef FT_MAX_CHARMAP_CACHEABLE
+ if ( cur - first > FT_MAX_CHARMAP_CACHEABLE )
+ {
+ FT_ERROR(( "find_unicode_charmap: UVS cmap is found "
+ "at too late position (%d)\n", cur - first ));
+ continue;
+ }
+#endif
return cur[0];
}

By this change, `return cur[0]' is executed for the
first cmap subtable. Therefore, the caller of this
function receives invalid cmap subtable, dereferring
NULL function pointers to access UVS data, and
FT2 client got crashed.

From `#ifdef FT_MAX_ ...' to `return cur[0];' should be
grouped by {}, aslike attached patch.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21923:  fix-uvs_20101105.diff added by mpsuzuki (560B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by mpsuzuki (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Nov 2010 01:01:08 AM UTCwlOpen/ClosedOpen=>Closed
    Thu 04 Nov 2010 02:30:55 PM UTCmpsuzukiStatusIn Progress=>Fixed
      Planned ReleaseNone=>2.4.4
    Thu 04 Nov 2010 02:23:02 PM UTCmpsuzukiAttached File-=>Added fix-uvs_20101105.diff, #21923

    Back to the top


    Powered by Savane 3.1-cleanup1