diff options
-rw-r--r-- | Python/getargs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index f166921..7931b33 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -256,6 +256,13 @@ vgetargs1(args, format, p_va, compat) return 0; } } + + if (*format != '\0' && !isalpha(*format) && + *format != '|' && *format != ':' && *format != ';') { + PyErr_Format(PyExc_SystemError, + "bad format string: %s", formatsave); + return 0; + } return 1; } |