]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a possible crash in range.__reversed__(). (GH-10252)
authorZackery Spytz <zspytz@gmail.com>
Wed, 31 Oct 2018 09:13:16 +0000 (03:13 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 31 Oct 2018 09:13:16 +0000 (11:13 +0200)
Objects/rangeobject.c

index 2b00a17425a287a4ea4dca0f085d0f00a3cfa061..e7b47bde6661ab86f5ce57f9e0099c3832ddcc1f 100644 (file)
@@ -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;