Commit ca6c30b1 authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.3 (#24044)

parents f63dc77a f3beac21
......@@ -28,6 +28,9 @@ Core and Builtins
- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
objects.
- Issue #24044: Fix possible null pointer dereference in list.sort in out of
memory conditions.
Library
-------
......
......@@ -1961,8 +1961,10 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
keys = &ms.temparray[saved_ob_size+1];
else {
keys = PyMem_MALLOC(sizeof(PyObject *) * saved_ob_size);
if (keys == NULL)
return NULL;
if (keys == NULL) {
PyErr_NoMemory();
goto keyfunc_fail;
}
}
for (i = 0; i < saved_ob_size ; i++) {
......
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