From 31a390e43f2ea2608c5ec04de7d012df14f16fda Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 19 Jul 2022 11:57:59 -0700 Subject: [3.10] gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) (GH-94963) (cherry picked from commit 067f0da33506f70c36a67d5f3d8d011c8dae10c9) Co-authored-by: Serhiy Storchaka --- Python/getargs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Python') diff --git a/Python/getargs.c b/Python/getargs.c index 92fc0aff32..d92ea2d8e6 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -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 *); } -- cgit v1.2.1