diff options
author | Zackery Spytz <zspytz@gmail.com> | 2018-10-31 09:13:16 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-31 09:13:16 (GMT) |
commit | c9a6168924ffa4f3f78175998b392fe23d3edc50 (patch) | |
tree | 29b38d6e3123f1757e10930691b1946c9c260cd9 /Objects | |
parent | 0353b4eaaf451ad463ce7eb3074f6b62d332f401 (diff) | |
download | cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.zip cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.gz cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.bz2 |
Fix a possible crash in range.__reversed__(). (GH-10252)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/rangeobject.c | 1 |
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; |