diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-02 07:54:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 07:54:43 (GMT) |
commit | a7b8a969eb3daacb1fcb029a8c5fecb5d09c964b (patch) | |
tree | e7a74fad735488001767a16ffb6c3fdbba7bddeb /Python/modsupport.c | |
parent | 5f2ade20a556f8c20555c7032436477d6dc86d4f (diff) | |
download | cpython-a7b8a969eb3daacb1fcb029a8c5fecb5d09c964b.zip cpython-a7b8a969eb3daacb1fcb029a8c5fecb5d09c964b.tar.gz cpython-a7b8a969eb3daacb1fcb029a8c5fecb5d09c964b.tar.bz2 |
[3.8] bpo-38913: Fix segfault in Py_BuildValue("(sGH-O)", ...) if entered with exception raised. (GH-18656). (GH-18732)
(cherry picked from commit 28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb)
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index 6255822..7271af3 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -343,11 +343,11 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) if (flags & FLAG_SIZE_T) n = va_arg(*p_va, Py_ssize_t); else { + n = va_arg(*p_va, int); if (PyErr_WarnEx(PyExc_DeprecationWarning, "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) { return NULL; } - n = va_arg(*p_va, int); } } else @@ -396,11 +396,11 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) if (flags & FLAG_SIZE_T) n = va_arg(*p_va, Py_ssize_t); else { + n = va_arg(*p_va, int); if (PyErr_WarnEx(PyExc_DeprecationWarning, "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) { return NULL; } - n = va_arg(*p_va, int); } } else @@ -434,11 +434,11 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags) if (flags & FLAG_SIZE_T) n = va_arg(*p_va, Py_ssize_t); else { + n = va_arg(*p_va, int); if (PyErr_WarnEx(PyExc_DeprecationWarning, "PY_SSIZE_T_CLEAN will be required for '#' formats", 1)) { return NULL; } - n = va_arg(*p_va, int); } } else |