Kaydet (Commit) bfa5a14a authored tarafından Guido van Rossum's avatar Guido van Rossum

Darn! Don't divide by zero. Bad fix. :-)

üst c18b3082
......@@ -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)
......
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