Avoid endless loop while tracing (#54858). * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with FT_DEBUG_LEVEL_TRACE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/ChangeLog b/ChangeLog
index 44e8373..d96be84 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-10-20 Werner Lemberg <wl@gnu.org>
+
+ Avoid endless loop while tracing (#54858).
+
+ * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
+ FT_DEBUG_LEVEL_TRACE.
+
2018-10-17 David Demelier <markand@malikania.fr>
* CMakeLists.txt: Specify `RUNTIME DESTINATION'.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index b33739b..e358c32 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1062,16 +1062,22 @@
parse_buildchar( T1_Face face,
T1_Loader loader )
{
- FT_UInt i;
-
-
face->len_buildchar = (FT_UInt)T1_ToFixedArray( &loader->parser,
0, NULL, 0 );
- FT_TRACE4(( " [" ));
- for ( i = 0; i < face->len_buildchar; i++ )
- FT_TRACE4(( " 0" ));
- FT_TRACE4(( "]\n" ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt i;
+
+
+ FT_TRACE4(( " [" ));
+ for ( i = 0; i < face->len_buildchar; i++ )
+ FT_TRACE4(( " 0" ));
+
+ FT_TRACE4(( "]\n" ));
+ }
+#endif
+
return;
}