From c9a6168924ffa4f3f78175998b392fe23d3edc50 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 31 Oct 2018 03:13:16 -0600 Subject: [PATCH] Fix a possible crash in range.__reversed__(). (GH-10252) --- Objects/rangeobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 2b00a17425a..e7b47bde666 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -1154,6 +1154,7 @@ long_range: it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type); if (it == NULL) return NULL; + it->index = it->start = it->step = NULL; /* start + (len - 1) * step */ it->len = range->length;