From: Zackery Spytz Date: Wed, 31 Oct 2018 09:13:16 +0000 (-0600) Subject: Fix a possible crash in range.__reversed__(). (GH-10252) X-Git-Tag: v3.8.0a1~608 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9a6168924ffa4f3f78175998b392fe23d3edc50;p=thirdparty%2FPython%2Fcpython.git Fix a possible crash in range.__reversed__(). (GH-10252) --- diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 2b00a17425a2..e7b47bde6661 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;