mirror of
https://github.com/python/cpython.git
synced 2025-11-08 21:52:45 +00:00
merge 3.3 (#24044)
This commit is contained in:
commit
bd91ee9cd7
2 changed files with 7 additions and 2 deletions
|
|
@ -28,6 +28,9 @@ Core and Builtins
|
||||||
- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
|
- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
|
||||||
objects.
|
objects.
|
||||||
|
|
||||||
|
- Issue #24044: Fix possible null pointer dereference in list.sort in out of
|
||||||
|
memory conditions.
|
||||||
|
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1961,8 +1961,10 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
|
||||||
keys = &ms.temparray[saved_ob_size+1];
|
keys = &ms.temparray[saved_ob_size+1];
|
||||||
else {
|
else {
|
||||||
keys = PyMem_MALLOC(sizeof(PyObject *) * saved_ob_size);
|
keys = PyMem_MALLOC(sizeof(PyObject *) * saved_ob_size);
|
||||||
if (keys == NULL)
|
if (keys == NULL) {
|
||||||
return NULL;
|
PyErr_NoMemory();
|
||||||
|
goto keyfunc_fail;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < saved_ob_size ; i++) {
|
for (i = 0; i < saved_ob_size ; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue