summaryrefslogtreecommitdiff
path: root/Python/marshal.c
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 /Python/marshal.c
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 'Python/marshal.c')
-rw-r--r--Python/marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 87a4b240a4..d71d3c2b9d 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1274,7 +1274,7 @@ r_object(RFILE *p)
if (n == 0 && type == TYPE_FROZENSET) {
/* call frozenset() to get the empty frozenset singleton */
- v = PyObject_CallFunction((PyObject*)&PyFrozenSet_Type, NULL);
+ v = _PyObject_CallNoArg((PyObject*)&PyFrozenSet_Type);
if (v == NULL)
break;
R_REF(v);
@@ -1649,7 +1649,7 @@ marshal_dump(PyObject *self, PyObject *args)
s = PyMarshal_WriteObjectToString(x, version);
if (s == NULL)
return NULL;
- res = _PyObject_CallMethodId(f, &PyId_write, "O", s);
+ res = _PyObject_CallMethodIdObjArgs(f, &PyId_write, s, NULL);
Py_DECREF(s);
return res;
}