Lines 1591-1597
Link Here
|
1591 |
FT_INVALID_TOO_SHORT; |
1591 |
FT_INVALID_TOO_SHORT; |
1592 |
|
1592 |
|
1593 |
length = TT_NEXT_ULONG( p ); |
1593 |
length = TT_NEXT_ULONG( p ); |
1594 |
if ( table + length > valid->limit || length < 8208 ) |
1594 |
if ( length > valid->limit - table || table + length > valid->limit || length < 8208 ) |
1595 |
FT_INVALID_TOO_SHORT; |
1595 |
FT_INVALID_TOO_SHORT; |
1596 |
|
1596 |
|
1597 |
is32 = table + 12; |
1597 |
is32 = table + 12; |
Lines 1819-1825
Link Here
|
1819 |
p = table + 16; |
1819 |
p = table + 16; |
1820 |
count = TT_NEXT_ULONG( p ); |
1820 |
count = TT_NEXT_ULONG( p ); |
1821 |
|
1821 |
|
1822 |
if ( table + length > valid->limit || length < 20 + count * 2 ) |
1822 |
if ( length > valid->limit - table || table + length > valid->limit || length < 20 + count * 2 ) |
1823 |
FT_INVALID_TOO_SHORT; |
1823 |
FT_INVALID_TOO_SHORT; |
1824 |
|
1824 |
|
1825 |
/* check glyph indices */ |
1825 |
/* check glyph indices */ |
Lines 2004-2010
Link Here
|
2004 |
p = table + 12; |
2004 |
p = table + 12; |
2005 |
num_groups = TT_NEXT_ULONG( p ); |
2005 |
num_groups = TT_NEXT_ULONG( p ); |
2006 |
|
2006 |
|
2007 |
if ( table + length > valid->limit || length < 16 + 12 * num_groups ) |
2007 |
if ( length > valid->limit - table || table + length > valid->limit || length < 16 + 12 * num_groups ) |
2008 |
FT_INVALID_TOO_SHORT; |
2008 |
FT_INVALID_TOO_SHORT; |
2009 |
|
2009 |
|
2010 |
/* check groups, they must be in increasing order */ |
2010 |
/* check groups, they must be in increasing order */ |
Lines 2385-2391
Link Here
|
2385 |
FT_ULong num_selectors = TT_NEXT_ULONG( p ); |
2385 |
FT_ULong num_selectors = TT_NEXT_ULONG( p ); |
2386 |
|
2386 |
|
2387 |
|
2387 |
|
2388 |
if ( table + length > valid->limit || length < 10 + 11 * num_selectors ) |
2388 |
if ( length > valid->limit - table || table + length > valid->limit || length < 10 + 11 * num_selectors ) |
2389 |
FT_INVALID_TOO_SHORT; |
2389 |
FT_INVALID_TOO_SHORT; |
2390 |
|
2390 |
|
2391 |
/* check selectors, they must be in increasing order */ |
2391 |
/* check selectors, they must be in increasing order */ |