[3.10] gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) (GH-94963)

(cherry picked from commit 067f0da335)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-07-19 11:57:59 -07:00 committed by GitHub
parent 374afb4a4e
commit 31a390e43f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 8 deletions

View file

@ -2533,9 +2533,7 @@ skipitem(const char **p_format, va_list *p_va, int flags)
if (*format == '#') {
if (p_va != NULL) {
if (!(flags & FLAG_SIZE_T)) {
PyErr_SetString(PyExc_SystemError,
"PY_SSIZE_T_CLEAN macro must be defined for '#' formats");
return NULL;
return "PY_SSIZE_T_CLEAN macro must be defined for '#' formats";
}
(void) va_arg(*p_va, Py_ssize_t *);
}