|
|
|
@ -284,22 +284,41 @@ |
|
|
|
|
OTV_Validator otvalid = &otvalidrec; |
|
|
|
|
FT_Bytes p = table; |
|
|
|
|
FT_UInt table_size; |
|
|
|
|
FT_UShort version; |
|
|
|
|
|
|
|
|
|
OTV_OPTIONAL_TABLE( HorizAxis ); |
|
|
|
|
OTV_OPTIONAL_TABLE( VertAxis ); |
|
|
|
|
|
|
|
|
|
OTV_OPTIONAL_TABLE32( itemVarStore ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
otvalid->root = ftvalid; |
|
|
|
|
|
|
|
|
|
FT_TRACE3(( "validating BASE table\n" )); |
|
|
|
|
OTV_INIT; |
|
|
|
|
|
|
|
|
|
OTV_LIMIT_CHECK( 6 ); |
|
|
|
|
OTV_LIMIT_CHECK( 4 ); |
|
|
|
|
|
|
|
|
|
if ( FT_NEXT_ULONG( p ) != 0x10000UL ) /* Version */ |
|
|
|
|
if ( FT_NEXT_USHORT( p ) != 1 ) /* majorVersion */ |
|
|
|
|
FT_INVALID_FORMAT; |
|
|
|
|
|
|
|
|
|
table_size = 6; |
|
|
|
|
version = FT_NEXT_USHORT( p ); /* minorVersion */ |
|
|
|
|
|
|
|
|
|
table_size = 8; |
|
|
|
|
switch ( version ) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
OTV_LIMIT_CHECK( 4 ); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case 1: |
|
|
|
|
OTV_LIMIT_CHECK( 8 ); |
|
|
|
|
table_size += 4; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
FT_INVALID_FORMAT; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
OTV_OPTIONAL_OFFSET( HorizAxis ); |
|
|
|
|
OTV_SIZE_CHECK( HorizAxis ); |
|
|
|
@ -311,6 +330,14 @@ |
|
|
|
|
if ( VertAxis ) |
|
|
|
|
otv_Axis_validate( table + VertAxis, otvalid ); |
|
|
|
|
|
|
|
|
|
if ( version > 0 ) |
|
|
|
|
{ |
|
|
|
|
OTV_OPTIONAL_OFFSET32( itemVarStore ); |
|
|
|
|
OTV_SIZE_CHECK32( itemVarStore ); |
|
|
|
|
if ( itemVarStore ) |
|
|
|
|
OTV_TRACE(( " [omitting itemVarStore validation]\n" )); /* XXX */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FT_TRACE4(( "\n" )); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|