summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c
index 7a4d2be2cb8..b6725c962fe 100644
--- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c
+++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttmtx.c
@@ -280,7 +280,7 @@
else
{
table_pos += 4 * ( k - 1 );
- if ( table_pos + 4 > table_end )
+ if ( table_pos + 2 > table_end )
goto NoData;
if ( FT_STREAM_SEEK( table_pos ) ||
@@ -292,7 +292,9 @@
*abearing = 0;
else
{
- if ( !FT_STREAM_SEEK( table_pos ) )
+ if ( FT_STREAM_SEEK( table_pos ) )
+ *abearing = 0;
+ else
(void)FT_READ_SHORT( *abearing );
}
}