summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-03-02 06:42:39 (GMT)
committerGitHub <noreply@github.com>2020-03-02 06:42:39 (GMT)
commit28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb (patch)
tree83383bd4da7d3e8353faae7a29d7658691f299ca /Python
parent2565edec2c974b2acca03b4cc5025e83f903ddd7 (diff)
downloadcpython-28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb.zip
cpython-28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb.tar.gz
cpython-28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb.tar.bz2
bpo-38913: Fix segfault in Py_BuildValue("(s#O)", ...) if entered with exception raised. (GH-18656)
Diffstat (limited to 'Python')
-rw-r--r--Python/modsupport.c6
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