summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-07-24 14:58:52 (GMT)
committerGitHub <noreply@github.com>2022-07-24 14:58:52 (GMT)
commit00474472944944b346d8409cfded84bb299f601a (patch)
tree3f8fce146302fb3f681544c8981b6ee46a86d621 /Include
parent3c94d3395edbcd299cbdacd09660ed88e654eeef (diff)
downloadcpython-00474472944944b346d8409cfded84bb299f601a.zip
cpython-00474472944944b346d8409cfded84bb299f601a.tar.gz
cpython-00474472944944b346d8409cfded84bb299f601a.tar.bz2
gh-95185: Check recursion depth in the AST constructor (#95186)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_ast_state.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_ast_state.h b/Include/internal/pycore_ast_state.h
index da78bba..f15b490 100644
--- a/Include/internal/pycore_ast_state.h
+++ b/Include/internal/pycore_ast_state.h
@@ -12,6 +12,8 @@ extern "C" {
struct ast_state {
int initialized;
+ int recursion_depth;
+ int recursion_limit;
PyObject *AST_type;
PyObject *Add_singleton;
PyObject *Add_type;