summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-18 15:41:22 (GMT)
committerGitHub <noreply@github.com>2022-07-18 15:41:22 (GMT)
commitec6ed6681d7334f2694ca62c035a8fe6b2b60ab3 (patch)
tree52baff3512c59592f0bb305710439e875459b318 /Python
parenta914fa979e0d6043da4b591e02d2b99d26853411 (diff)
downloadcpython-ec6ed6681d7334f2694ca62c035a8fe6b2b60ab3.zip
cpython-ec6ed6681d7334f2694ca62c035a8fe6b2b60ab3.tar.gz
cpython-ec6ed6681d7334f2694ca62c035a8fe6b2b60ab3.tar.bz2
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)
(cherry picked from commit 067f0da33506f70c36a67d5f3d8d011c8dae10c9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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 d7ba9a1..4b5fd1c 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2695,9 +2695,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 *);
}