avoid referencing past the bounds of an array
This commit is contained in:
parent
c77e7a4f23
commit
4a42cd48d5
|
@ -1963,7 +1963,7 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds)
|
||||||
if (keys[i] == NULL) {
|
if (keys[i] == NULL) {
|
||||||
for (i=i-1 ; i>=0 ; i--)
|
for (i=i-1 ; i>=0 ; i--)
|
||||||
Py_DECREF(keys[i]);
|
Py_DECREF(keys[i]);
|
||||||
if (keys != &ms.temparray[saved_ob_size+1])
|
if (saved_ob_size >= MERGESTATE_TEMP_SIZE/2)
|
||||||
PyMem_FREE(keys);
|
PyMem_FREE(keys);
|
||||||
goto keyfunc_fail;
|
goto keyfunc_fail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue