From bfa5a14adb323cfa92d6c5c71d0fb786d543313a Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Fri, 11 Oct 2002 23:39:35 +0000
Subject: Darn!  Don't divide by zero.  Bad fix. :-)

---
 Objects/listobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Objects/listobject.c b/Objects/listobject.c
index 2cb08d3..45b0951 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -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)
-- 
cgit v0.12

