summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 8761477..2e729ea 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -611,6 +611,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
if (newsize > PY_SSIZE_T_MAX || (newsize-3) / 4 != length) {
PyErr_SetString(PyExc_OverflowError,
"bytes object is too large to make repr");
+ return NULL;
}
v = PyUnicode_FromUnicode(NULL, newsize);
if (v == NULL) {