[sfnt] Fix Savannah bug #43656.
* src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity tests.
This commit is contained in:
parent
dd89710f0f
commit
9bd20b7304
@ -1,3 +1,10 @@
|
||||
2014-11-22 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sfnt] Fix Savannah bug #43656.
|
||||
|
||||
* src/sfnt/ttcmap.c (tt_cmap4_validate): Fix order of validity
|
||||
tests.
|
||||
|
||||
2014-11-21 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[type1, type42] Fix Savannah bug #43655.
|
||||
|
@ -845,9 +845,6 @@
|
||||
p = table + 2; /* skip format */
|
||||
length = TT_NEXT_USHORT( p );
|
||||
|
||||
if ( length < 16 )
|
||||
FT_INVALID_TOO_SHORT;
|
||||
|
||||
/* in certain fonts, the `length' field is invalid and goes */
|
||||
/* out of bound. We try to correct this here... */
|
||||
if ( table + length > valid->limit )
|
||||
@ -858,6 +855,9 @@
|
||||
length = (FT_UInt)( valid->limit - table );
|
||||
}
|
||||
|
||||
if ( length < 16 )
|
||||
FT_INVALID_TOO_SHORT;
|
||||
|
||||
p = table + 6;
|
||||
num_segs = TT_NEXT_USHORT( p ); /* read segCountX2 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user