mirror of https://github.com/python/cpython
Darn! Don't divide by zero. Bad fix. :-)
This commit is contained in:
parent
c18b308229
commit
bfa5a14adb
|
@ -421,7 +421,7 @@ list_repeat(PyListObject *a, int n)
|
|||
if (n < 0)
|
||||
n = 0;
|
||||
size = a->ob_size * n;
|
||||
if (size/a->ob_size != n)
|
||||
if (n && size/n != a->ob_size)
|
||||
return PyErr_NoMemory();
|
||||
np = (PyListObject *) PyList_New(size);
|
||||
if (np == NULL)
|
||||
|
|
Loading…
Reference in New Issue