summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-10-03 00:12:06 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-10-03 00:20:10 +0300
commitaba1f9167a7db1c0f19d2ab44a8dbfe5c18cc062 (patch)
tree02a30b6ad96563eb934d4c656a8ad422adfaa723
parentc9a0b2a8182abcb87afa1d8766d74ca8fa87cb34 (diff)
extmod/modure: Add stack overflow checking when executing a regex.
-rw-r--r--extmod/modure.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/modure.c b/extmod/modure.c
index 2baebdecc..7e1c24325 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -32,9 +32,12 @@
#include "py/runtime.h"
#include "py/binary.h"
#include "py/objstr.h"
+#include "py/stackctrl.h"
#if MICROPY_PY_URE
+#define re1_5_stack_chk() MP_STACK_CHECK()
+
#include "re1.5/re1.5.h"
#define FLAG_DEBUG 0x1000