mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Introduce an upper bound on tuple nesting depth in
C argument format strings; fixes rest of #1523610.
This commit is contained in:
parent
8e24a9678f
commit
209307eb3b
1 changed files with 3 additions and 0 deletions
|
@ -206,6 +206,9 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
|
|||
if (level == 0)
|
||||
max++;
|
||||
level++;
|
||||
if (level >= 30)
|
||||
Py_FatalError("too many tuple nesting levels "
|
||||
"in argument format string");
|
||||
break;
|
||||
case ')':
|
||||
if (level == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue