summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-11-20 09:14:34 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-11-20 09:14:34 +0900
commit86d102350b4e68ae7ad4c1fef684f53a275790dc (patch)
treecc591acf8b03f0cc88c1893f61c15b12b7afbf93 /include/mruby.h
parentafd46eccd14e20a3898c81a3168ec764f1010bdf (diff)
downloadmruby-86d102350b4e68ae7ad4c1fef684f53a275790dc.tar.gz
mruby-86d102350b4e68ae7ad4c1fef684f53a275790dc.zip
Restrict total recursion number of `ecall()`; fix #3789
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 12df9cd5a..5ff7a1d7b 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -267,7 +267,8 @@ typedef struct mrb_state {
#else
mrb_atexit_func *atexit_stack;
#endif
- mrb_int atexit_stack_len;
+ uint16_t atexit_stack_len;
+ uint16_t ecall_nest; /* prevent infinite recursive ecall() */
} mrb_state;
/**