diff Modules/arraymodule.c @ 58561:c57998e3be33 legacy-trunk

Issue #7788: Fix a crash produced by deleting a list slice with huge step value. Patch by Marcin Bachry.
author Mark Dickinson <dickinsm@gmail.com>
date Fri, 29 Jan 2010 17:11:39 +0000
parents 3a316243bd6c
children 5e6edb4e76f5
line wrap: on
line diff
--- a/Modules/arraymodule.c	Thu Jan 28 21:16:33 2010 +0000
+++ b/Modules/arraymodule.c	Fri Jan 29 17:11:39 2010 +0000
@@ -1792,8 +1792,9 @@
 	}
 	else if (needed == 0) {
 		/* Delete slice */
-		Py_ssize_t cur, i;
-		
+		size_t cur;
+		Py_ssize_t i;
+
 		if (step < 0) {
 			stop = start + 1;
 			start = stop + step * (slicelength - 1) - 1;