diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-10-31 09:33:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-31 09:33:00 (GMT) |
commit | 00093f61b38c01045b71a27eef0ff64a69188e8f (patch) | |
tree | aad421607abe8adddcba627c73e603268e7f90db | |
parent | 1e8c18509eb15efb8e80971b9935d17e7bbeabf4 (diff) | |
download | cpython-00093f61b38c01045b71a27eef0ff64a69188e8f.zip cpython-00093f61b38c01045b71a27eef0ff64a69188e8f.tar.gz cpython-00093f61b38c01045b71a27eef0ff64a69188e8f.tar.bz2 |
Fix a possible crash in range.__reversed__(). (GH-10252)
(cherry picked from commit c9a6168924ffa4f3f78175998b392fe23d3edc50)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
-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 2fc70cd..4f392a4 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -1256,6 +1256,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; |