summaryrefslogtreecommitdiff
path: root/Modules/_decimal
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-02-04 22:57:44 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-02-04 22:57:44 +0200
commit44a28ecbe2c09fe5ec4959c254fdfe5b6a9fe322 (patch)
tree007442e524d9584fe16f0d80ad2b8933809f3b1b /Modules/_decimal
parent2296b978597ce62ec2185b78a43811610af2c0ea (diff)
parentefe8c92c7a269af2f9ded960735e74d62d791330 (diff)
downloadcpython-44a28ecbe2c09fe5ec4959c254fdfe5b6a9fe322.tar.gz
Issue #29444: Fixed out-of-bounds buffer access in the group() method of
the match object. Based on patch by WGH.
Diffstat (limited to 'Modules/_decimal')
-rw-r--r--Modules/_decimal/_decimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index fcc1f151cf..933b3f575a 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -3199,7 +3199,7 @@ dec_format(PyObject *dec, PyObject *args)
}
if (PyUnicode_Check(fmtarg)) {
- fmt = PyUnicode_AsUTF8AndSize(fmtarg, &size);
+ fmt = (char *)PyUnicode_AsUTF8AndSize(fmtarg, &size);
if (fmt == NULL) {
return NULL;
}