Kaydet (Commit) e6a6f39c authored tarafından Guido van Rossum's avatar Guido van Rossum

Backport r58892.

Add missing "return NULL" in overflow check in PyString_Repr().
üst a1e5387e
...@@ -861,6 +861,7 @@ PyString_Repr(PyObject *obj, int smartquotes) ...@@ -861,6 +861,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
if (newsize > PY_SSIZE_T_MAX || newsize / 4 != op->ob_size) { if (newsize > PY_SSIZE_T_MAX || newsize / 4 != op->ob_size) {
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