summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-07-18 15:07:31 (GMT)
committerGitHub <noreply@github.com>2022-07-18 15:07:31 (GMT)
commit067f0da33506f70c36a67d5f3d8d011c8dae10c9 (patch)
treec6cf952e26949902479d7729af9da92acdf0ba38 /Python
parent2f8bff6879c5d76d143068e8bc867196a7d28afc (diff)
downloadcpython-067f0da33506f70c36a67d5f3d8d011c8dae10c9.zip
cpython-067f0da33506f70c36a67d5f3d8d011c8dae10c9.tar.gz
cpython-067f0da33506f70c36a67d5f3d8d011c8dae10c9.tar.bz2
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index fb4a512..4188116 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2641,9 +2641,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 *);
}