Commit 7fa27476 authored by Guido van Rossum's avatar Guido van Rossum

Add missing "return NULL" in overflow check in PyObject_Repr().

parent a563a648
...@@ -869,6 +869,7 @@ PyString_Repr(PyObject *obj, int smartquotes) ...@@ -869,6 +869,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
if (newsize > PY_SSIZE_T_MAX || newsize / 4 != Py_Size(op)) { if (newsize > PY_SSIZE_T_MAX || newsize / 4 != Py_Size(op)) {
PyErr_SetString(PyExc_OverflowError, PyErr_SetString(PyExc_OverflowError,
"string is too large to make repr"); "string is too large to make repr");
return NULL;
} }
v = PyString_FromStringAndSize((char *)NULL, newsize); v = PyString_FromStringAndSize((char *)NULL, newsize);
if (v == NULL) { if (v == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment