[woff2] Minor.
* src/sfnt/sfwoff2.c (woff2_uncompress): Add error message (woff2_open_font): Free `uncompressed_buf'.
This commit is contained in:
parent
fc65d45a62
commit
c6c2c0b574
|
@ -1,3 +1,10 @@
|
||||||
|
2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
|
||||||
|
|
||||||
|
[woff2] Minor.
|
||||||
|
|
||||||
|
* src/sfnt/sfwoff2.c (woff2_uncompress): Add error message
|
||||||
|
(woff2_open_font): Free `uncompressed_buf'.
|
||||||
|
|
||||||
2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
|
2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
|
||||||
|
|
||||||
[woff2] Uncompress Brotli streams and `face_index' support.
|
[woff2] Uncompress Brotli streams and `face_index' support.
|
||||||
|
|
|
@ -219,7 +219,10 @@
|
||||||
|
|
||||||
if( result != BROTLI_DECODER_RESULT_SUCCESS ||
|
if( result != BROTLI_DECODER_RESULT_SUCCESS ||
|
||||||
uncompressed_size != dst_size )
|
uncompressed_size != dst_size )
|
||||||
|
{
|
||||||
|
FT_ERROR(( "woff2_uncompress: Stream length mismatch.\n" ));
|
||||||
return FT_THROW( Invalid_Table );
|
return FT_THROW( Invalid_Table );
|
||||||
|
}
|
||||||
|
|
||||||
return FT_Err_Ok;
|
return FT_Err_Ok;
|
||||||
|
|
||||||
|
@ -498,7 +501,6 @@
|
||||||
}
|
}
|
||||||
/* Collection directory reading complete. */
|
/* Collection directory reading complete. */
|
||||||
FT_TRACE2(( "WOFF2 collection dirtectory is valid.\n" ));
|
FT_TRACE2(( "WOFF2 collection dirtectory is valid.\n" ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
first_table_offset = compute_first_table_offset( &woff2 );
|
first_table_offset = compute_first_table_offset( &woff2 );
|
||||||
|
@ -506,7 +508,7 @@
|
||||||
|
|
||||||
woff2.compressed_offset = FT_STREAM_POS();
|
woff2.compressed_offset = FT_STREAM_POS();
|
||||||
file_offset = ROUND4( woff2.compressed_offset +
|
file_offset = ROUND4( woff2.compressed_offset +
|
||||||
woff2.totalCompressedSize );
|
woff2.totalCompressedSize );
|
||||||
|
|
||||||
/* Few more checks before we start reading the tables. */
|
/* Few more checks before we start reading the tables. */
|
||||||
if( file_offset > woff2.length )
|
if( file_offset > woff2.length )
|
||||||
|
@ -619,6 +621,7 @@
|
||||||
Exit:
|
Exit:
|
||||||
FT_FREE( tables );
|
FT_FREE( tables );
|
||||||
FT_FREE( indices );
|
FT_FREE( indices );
|
||||||
|
FT_FREE( uncompressed_buf );
|
||||||
|
|
||||||
if( error )
|
if( error )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue