[truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223). * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it with #ifndef ... #endif, as suggested in the tracker issue.
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 50 51 52 53 54 55
diff --git a/ChangeLog b/ChangeLog
index 369bef4..0e1c868 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2015-10-18 Werner Lemberg <wl@gnu.org>
+ [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223).
+
+ * devel/ftoption.h, include/freetype/config/ftoption.h: Surround it
+ with #ifndef ... #endif, as suggested in the tracker issue.
+
+2015-10-18 Werner Lemberg <wl@gnu.org>
+
[truetype] Better protection against malformed `fpgm' (#46223).
* src/truetype/ttobjs.c (tt_size_init_bytecode): Don't execute a
diff --git a/devel/ftoption.h b/devel/ftoption.h
index 0eb8324..f68b3ad 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -700,7 +700,14 @@ FT_BEGIN_HEADER
/* want to change this except for very special situations (e.g., making */
/* a library fuzzer spend less time to handle broken fonts). */
/* */
+ /* It is not expected that this value is ever modified by a configuring */
+ /* script; instead, it gets surrounded with #ifndef ... #endif so that */
+ /* the value can be set as a preprocessor option on the compiler's */
+ /* command line. */
+ /* */
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
+#endif
/*************************************************************************/
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 270c566..b481f8f 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -700,7 +700,14 @@ FT_BEGIN_HEADER
/* want to change this except for very special situations (e.g., making */
/* a library fuzzer spend less time to handle broken fonts). */
/* */
+ /* It is not expected that this value is ever modified by a configuring */
+ /* script; instead, it gets surrounded with #ifndef ... #endif so that */
+ /* the value can be set as a preprocessor option on the compiler's */
+ /* command line. */
+ /* */
+#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
+#endif
/*************************************************************************/