From aba1f9167a7db1c0f19d2ab44a8dbfe5c18cc062 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 3 Oct 2017 00:12:06 +0300 Subject: [PATCH] extmod/modure: Add stack overflow checking when executing a regex. --- extmod/modure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extmod/modure.c b/extmod/modure.c index 2baebdecc6..7e1c24325f 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