[woff2] Return if single stream operation fails.

* src/sfnt/sfwoff2.c (get_x_mins): Do it.

* src/sfnt/woff2tags.c: Remove unused include.
This commit is contained in:
Nikhil Ramakrishnan 2020-04-04 14:06:37 +05:30
parent 13c0df80dc
commit 7a019a63ed
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2020-04-04 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
[woff2] Return if single stream operation fails.
* src/sfnt/sfwoff2.c (get_x_mins): Do it.
* src/sfnt/woff2tags.c: Remove unused include.
2020-03-22 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
[docs] Fix building docs if `srcdir' != `builddir'.

View File

@ -1288,7 +1288,7 @@
}
/* Read `numGlyphs' field from `maxp' table. */
if ( FT_STREAM_SEEK( maxp_table->src_offset ) && FT_STREAM_SKIP( 8 ) )
if ( FT_STREAM_SEEK( maxp_table->src_offset ) || FT_STREAM_SKIP( 8 ) )
return error;
if ( FT_READ_USHORT( num_glyphs ) )
@ -1297,7 +1297,7 @@
info->num_glyphs = num_glyphs;
/* Read `indexToLocFormat' field from `head' table. */
if ( FT_STREAM_SEEK( head_table->src_offset ) &&
if ( FT_STREAM_SEEK( head_table->src_offset ) ||
FT_STREAM_SKIP( 50 ) )
return error;
@ -1335,7 +1335,7 @@
glyf_offset += info->glyf_table->src_offset;
if ( FT_STREAM_SEEK( glyf_offset ) && FT_STREAM_SKIP( 2 ) )
if ( FT_STREAM_SEEK( glyf_offset ) || FT_STREAM_SKIP( 2 ) )
return error;
if ( FT_READ_USHORT( info->x_mins[i] ) )

View File

@ -17,7 +17,6 @@
#include <ft2build.h>
#include "sfwoff.h"
#include FT_TRUETYPE_TAGS_H