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:
@@ -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 *);
|
||||
|
||||
Reference in New Issue
Block a user