summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-04-03 00:57:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-04-03 00:57:33 (GMT)
commitbea424af98468a7fc5c505c949218e22862d2b40 (patch)
tree6990df25667157e2a0d4f50f5e2ac0887810f046 /Python
parent3928276e6442f52b0a2717df8d8441dbe03ccd53 (diff)
downloadcpython-bea424af98468a7fc5c505c949218e22862d2b40.zip
cpython-bea424af98468a7fc5c505c949218e22862d2b40.tar.gz
cpython-bea424af98468a7fc5c505c949218e22862d2b40.tar.bz2
more _PyString_Resize error checking
Diffstat (limited to 'Python')
-rw-r--r--Python/marshal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index c7015d2..9e4a692 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1237,7 +1237,8 @@ PyMarshal_WriteObjectToString(PyObject *x, int version)
"too much marshall data for a string");
return NULL;
}
- _PyString_Resize(&wf.str, (Py_ssize_t)(wf.ptr - base));
+ if (_PyString_Resize(&wf.str, (Py_ssize_t)(wf.ptr - base)))
+ return NULL;
}
if (wf.error != WFERR_OK) {
Py_XDECREF(wf.str);