summaryrefslogtreecommitdiffstats
path: root/Objects/rangeobject.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-10-31 09:13:16 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-10-31 09:13:16 (GMT)
commitc9a6168924ffa4f3f78175998b392fe23d3edc50 (patch)
tree29b38d6e3123f1757e10930691b1946c9c260cd9 /Objects/rangeobject.c
parent0353b4eaaf451ad463ce7eb3074f6b62d332f401 (diff)
downloadcpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.zip
cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.gz
cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.bz2
Fix a possible crash in range.__reversed__(). (GH-10252)
Diffstat (limited to 'Objects/rangeobject.c')
-rw-r--r--Objects/rangeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index 2b00a17..e7b47bd 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;