mirror of
https://github.com/python/cpython.git
synced 2026-01-29 02:32:18 +00:00
Backport r58892.
Add missing "return NULL" in overflow check in PyString_Repr().
This commit is contained in:
parent
a1e5387ec5
commit
e6a6f39cc7
1 changed files with 1 additions and 0 deletions
|
|
@ -861,6 +861,7 @@ PyString_Repr(PyObject *obj, int smartquotes)
|
|||
if (newsize > PY_SSIZE_T_MAX || newsize / 4 != op->ob_size) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"string is too large to make repr");
|
||||
return NULL;
|
||||
}
|
||||
v = PyString_FromStringAndSize((char *)NULL, newsize);
|
||||
if (v == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue