Commit 703bb1dd authored by Georg Brandl's avatar Georg Brandl

Introduce an upper bound on tuple nesting depth in

C argument format strings; fixes rest of #1523610.
parent 834a18a4
...@@ -206,6 +206,9 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags) ...@@ -206,6 +206,9 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
if (level == 0) if (level == 0)
max++; max++;
level++; level++;
if (level >= 30)
Py_FatalError("too many tuple nesting levels "
"in argument format string");
break; break;
case ')': case ')':
if (level == 0) if (level == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment