summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-20 01:56:21 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-20 01:56:21 +0000
commitbbda1cc717797ba68eb2eda0dd18205ea4413009 (patch)
tree2ab54b718e2475169b65b58818934da04c602e36 /Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c
parentff31ae48b941d2911b213d6fcf6043bfecf803ef (diff)
freetype2 2.8.0
git-svn-id: svn://tug.org/texlive/trunk@44650 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c
index 6f9fa522d5e..c97e5789ac7 100644
--- a/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c
+++ b/Build/source/libs/freetype2/freetype-src/src/sfnt/ttkern.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType kerning table. This doesn't handle */
/* kerning data within the GPOS table at the moment. */
/* */
-/* Copyright 1996-2016 by */
+/* Copyright 1996-2017 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -108,8 +108,8 @@
p_next = p_limit;
/* only use horizontal kerning tables */
- if ( ( coverage & ~8U ) != 0x0001 ||
- p + 8 > p_limit )
+ if ( ( coverage & 3U ) != 0x0001 ||
+ p + 8 > p_next )
goto NextTable;
num_pairs = FT_NEXT_USHORT( p );
@@ -214,8 +214,7 @@
if ( ( face->kern_avail_bits & mask ) == 0 )
goto NextTable;
- if ( p + 8 > next )
- goto NextTable;
+ FT_ASSERT( p + 8 <= next ); /* tested in tt_face_load_kern */
num_pairs = FT_NEXT_USHORT( p );
p += 6;