[UVS] Fix find_variant_selector_charmap(), Savannah bug #31545. Since 2010-07-04, find_variant_selector_charmap() returns the first cmap subtable always under rogue-compatible configuration, it causes NULL pointer dereference and make UVS-related functions crashed. * src/base/ftobjs.c (Fix find_variant_selector_charmap): Returns UVS cmap correctly.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/ChangeLog b/ChangeLog
index 6e896b6..c4af544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
+ [UVS] Fix find_variant_selector_charmap(), Savannah bug #31545.
+
+ Since 2010-07-04, find_variant_selector_charmap() returns
+ the first cmap subtable always under rogue-compatible
+ configuration, it causes NULL pointer dereference and
+ make UVS-related functions crashed.
+
+ * src/base/ftobjs.c (Fix find_variant_selector_charmap):
+ Returns UVS cmap correctly.
+
2010-11-01 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftsmooth] Improve rendering.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index d12a71b..cb44b8c 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1062,6 +1062,7 @@
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 )
{
@@ -1071,6 +1072,7 @@
}
#endif
return cur[0];
+ }
}
return NULL;