mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Add missing "return NULL" in overflow check in PyObject_Repr().
This commit is contained in:
parent
e1ac4f1930
commit
9b847b432c
1 changed files with 1 additions and 0 deletions
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue