[truetype] Check avar_segment before access
* src/truetype/ttgxvar.c (tt_done_blend): check `avar_segment` before accessing to free its `correspondence`. Reported as: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53062
This commit is contained in:
parent
d38407f79e
commit
9154707f6b
|
@ -4500,9 +4500,12 @@
|
|||
|
||||
if ( blend->avar_table )
|
||||
{
|
||||
for ( i = 0; i < num_axes; i++ )
|
||||
FT_FREE( blend->avar_table->avar_segment[i].correspondence );
|
||||
FT_FREE( blend->avar_table->avar_segment );
|
||||
if ( blend->avar_table->avar_segment )
|
||||
{
|
||||
for ( i = 0; i < num_axes; i++ )
|
||||
FT_FREE( blend->avar_table->avar_segment[i].correspondence );
|
||||
FT_FREE( blend->avar_table->avar_segment );
|
||||
}
|
||||
|
||||
tt_var_done_item_variation_store( face,
|
||||
&blend->avar_table->itemStore );
|
||||
|
|
Loading…
Reference in New Issue