mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
more _PyString_Resize error checking
This commit is contained in:
parent
3928276e64
commit
bea424af98
3 changed files with 20 additions and 13 deletions
|
|
@ -1237,7 +1237,8 @@ PyMarshal_WriteObjectToString(PyObject *x, int version)
|
|||
"too much marshall data for a string");
|
||||
return NULL;
|
||||
}
|
||||
_PyString_Resize(&wf.str, (Py_ssize_t)(wf.ptr - base));
|
||||
if (_PyString_Resize(&wf.str, (Py_ssize_t)(wf.ptr - base)))
|
||||
return NULL;
|
||||
}
|
||||
if (wf.error != WFERR_OK) {
|
||||
Py_XDECREF(wf.str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue