mirror of
https://github.com/python/cpython.git
synced 2025-07-25 04:04:13 +00:00
Darn! Don't divide by zero. Bad fix. :-)
This commit is contained in:
parent
c18b308229
commit
bfa5a14adb
1 changed files with 1 additions and 1 deletions
|
@ -421,7 +421,7 @@ list_repeat(PyListObject *a, int n)
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
n = 0;
|
n = 0;
|
||||||
size = a->ob_size * n;
|
size = a->ob_size * n;
|
||||||
if (size/a->ob_size != n)
|
if (n && size/n != a->ob_size)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
np = (PyListObject *) PyList_New(size);
|
np = (PyListObject *) PyList_New(size);
|
||||||
if (np == NULL)
|
if (np == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue