summaryrefslogtreecommitdiff
path: root/Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.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/psaux/t1decode.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/psaux/t1decode.c')
-rw-r--r--Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.c b/Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.c
index 1cd9d730a40..7dd45135de3 100644
--- a/Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.c
+++ b/Build/source/libs/freetype2/freetype-src/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2016 by */
+/* Copyright 2000-2017 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -666,9 +666,9 @@
#ifdef FT_DEBUG_LEVEL_TRACE
if ( large_int )
- FT_TRACE4(( " %ld", value ));
+ FT_TRACE4(( " %d", value ));
else
- FT_TRACE4(( " %ld", value / 65536 ));
+ FT_TRACE4(( " %d", value / 65536 ));
#endif
*top++ = value;
@@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which don't */
+ /* increase `num_flex_vectors'); we thus have to */
+ /* check whether we can add a point */
+ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
+ goto Syntax_Error;
+
t1_builder_add_point( builder,
x,
y,
(FT_Byte)( idx == 3 || idx == 6 ) );
+ }
}
break;