Issue #7788: Fix a crash produced by deleting a list slice with huge step value. Patch by Marcin Bachry.
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 018ab87..c631b61 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c
@@ -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;