mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)
Co-authored-by: Joe Jevnik <joe@quantopian.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
e17cd1fbfd
commit
eb927e9fc8
4 changed files with 146 additions and 17 deletions
|
@ -2641,6 +2641,11 @@ skipitem(const char **p_format, va_list *p_va, int flags)
|
|||
if (p_va != NULL) {
|
||||
(void) va_arg(*p_va, char **);
|
||||
}
|
||||
if (c == 'w' && *format != '*')
|
||||
{
|
||||
/* after 'w', only '*' is allowed */
|
||||
goto err;
|
||||
}
|
||||
if (*format == '#') {
|
||||
if (p_va != NULL) {
|
||||
(void) va_arg(*p_va, Py_ssize_t *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue