summaryrefslogtreecommitdiff
path: root/pango/opentype/ftxopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/opentype/ftxopen.c')
-rw-r--r--pango/opentype/ftxopen.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/pango/opentype/ftxopen.c b/pango/opentype/ftxopen.c
index ba605bd7..5d9cfad3 100644
--- a/pango/opentype/ftxopen.c
+++ b/pango/opentype/ftxopen.c
@@ -584,6 +584,8 @@
TTO_SubTable* st;
+ Bool is_extension = FALSE;
+
base_offset = FILE_Pos();
@@ -603,6 +605,10 @@
st = l->SubTable;
+ if ( ( type == GSUB && l->LookupType == GSUB_LOOKUP_EXTENSION ) ||
+ ( type == GPOS && l->LookupType == GPOS_LOOKUP_EXTENSION ) )
+ is_extension = TRUE;
+
for ( n = 0; n < count; n++ )
{
if ( ACCESS_Frame( 2L ) )
@@ -613,6 +619,19 @@
FORGET_Frame();
cur_offset = FILE_Pos();
+
+ if ( is_extension )
+ {
+ if ( FILE_Seek( new_offset ) || ACCESS_Frame( 8L ) )
+ goto Fail;
+
+ (void)GET_UShort(); /* format should be 1 */
+ l->LookupType = GET_UShort();
+ new_offset = GET_ULong() + base_offset;
+
+ FORGET_Frame();
+ }
+
if ( FILE_Seek( new_offset ) ||
( error = Load_SubTable( &st[n], stream,
type, l->LookupType ) ) != TT_Err_Ok )