=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: widl: Increase max import depth.

Alexandre Julliard julliard at winehq.org
Mon Jan 29 14:48:16 CST 2018


Module: wine
Branch: master
Commit: ba6b020b9f792539f4004ec93932231715e90051
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ba6b020b9f792539f4004ec93932231715e90051

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Fri Jan 26 22:09:03 2018 +0100

widl: Increase max import depth.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/parser.l | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 6520ce7..6afc3e7 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -78,7 +78,7 @@ static int attr_token(const char *kw);
 
 static warning_list_t *disabled_warnings = NULL;
 
-#define MAX_IMPORT_DEPTH 10
+#define MAX_IMPORT_DEPTH 20
 struct {
   YY_BUFFER_STATE state;
   char *input_name;
@@ -524,6 +524,9 @@ int do_import(char *fname)
         else if (!(path = wpp_find_include( fname, input_name )))
             error_loc("Unable to open include file %s\n", fname);
 
+    if (import_stack_ptr == MAX_IMPORT_DEPTH)
+        error_loc("Exceeded max import depth\n");
+
 	import_stack[ptr].temp_name = temp_name;
 	import_stack[ptr].input_name = input_name;
 	import_stack[ptr].line_number = line_number;




More information about the wine-cvs mailing list