summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-06 23:32:56 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-06 23:32:56 (GMT)
commit9b847b432cda06cb1c1fd58a46efb7f0eca1cad1 (patch)
treeadc7162a0a0df65b660384559a75ca5de243ec8e
parente1ac4f19301aa0a4d28fc25b91c71c477c37cb21 (diff)
downloadcpython-9b847b432cda06cb1c1fd58a46efb7f0eca1cad1.zip
cpython-9b847b432cda06cb1c1fd58a46efb7f0eca1cad1.tar.gz
cpython-9b847b432cda06cb1c1fd58a46efb7f0eca1cad1.tar.bz2
Add missing "return NULL" in overflow check in PyObject_Repr().
-rw-r--r--Objects/stringobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 3c14022..ce24154 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -869,6 +869,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
if (newsize > PY_SSIZE_T_MAX || newsize / 4 != Py_Size(op)) {
PyErr_SetString(PyExc_OverflowError,
"string is too large to make repr");
+ return NULL;
}
v = PyString_FromStringAndSize((char *)NULL, newsize);
if (v == NULL) {