Kaydet (Commit) e0cf6247 authored tarafından Neal Norwitz's avatar Neal Norwitz

Backport 52505:

Prevent crash if alloc of garbage fails.  Found by Typo.pl.
üst 2f0940b6
......@@ -2606,6 +2606,11 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value)
garbage = (PyObject**)
PyMem_MALLOC(slicelength*sizeof(PyObject*));
if (!garbage) {
Py_DECREF(seq);
PyErr_NoMemory();
return -1;
}
selfitems = self->ob_item;
seqitems = PySequence_Fast_ITEMS(seq);
......
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