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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  suzuki toshiya <mpsuzuki>
Submitted:  Thu 04 Nov 2010 02:23:02 PM UTC
   
 
Severity:  4 - Important Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  mpsuzuki Open/Closed:  Closed
Planned Release:  2.4.4

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

Fixed on GIT.

suzuki toshiya <mpsuzuki>
Group administrator
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>
Group administrator

 

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

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
  • -email is unavailable- added by wl (Updated the item)
  • -email is unavailable- added by mpsuzuki (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-15 wl Open/ClosedOpen Closed
    2010-11-04 mpsuzuki StatusIn Progress Fixed
        Planned ReleaseNone 2.4.4
    2010-11-04 mpsuzuki Attached File- Added fix-uvs_20101105.diff, #21923

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code