summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>2019-06-30 19:32:27 +0530
committerNikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>2019-06-30 19:32:27 +0530
commit6cb11464335290529420222b21bff4cc38fdb32b (patch)
tree7d09b72d4bc26cfbfba050ad7974ceb3b4acf9ce
parentf6c4d58ec8340051051311ef4781089a9e56d17c (diff)
downloadfreetype2-6cb11464335290529420222b21bff4cc38fdb32b.tar.gz
* src/sfnt/sfwoff2.c: Minor.
-rw-r--r--src/sfnt/sfwoff2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index ec3060200..614c99b39 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -219,7 +219,10 @@
if( result != BROTLI_DECODER_RESULT_SUCCESS ||
uncompressed_size != dst_size )
+ {
+ FT_ERROR(( "woff2_uncompress: Stream length mismatch.\n" ));
return FT_THROW( Invalid_Table );
+ }
return FT_Err_Ok;
@@ -498,7 +501,6 @@
}
/* Collection directory reading complete. */
FT_TRACE2(( "WOFF2 collection dirtectory is valid.\n" ));
-
}
first_table_offset = compute_first_table_offset( &woff2 );
@@ -506,7 +508,7 @@
woff2.compressed_offset = FT_STREAM_POS();
file_offset = ROUND4( woff2.compressed_offset +
- woff2.totalCompressedSize );
+ woff2.totalCompressedSize );
/* Few more checks before we start reading the tables. */
if( file_offset > woff2.length )
@@ -619,6 +621,7 @@
Exit:
FT_FREE( tables );
FT_FREE( indices );
+ FT_FREE( uncompressed_buf );
if( error )
{