diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-10-31 02:31:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-31 02:31:29 -0700 |
commit | da15389fddb85cf8a97b81e75de7d77b5f505b56 (patch) | |
tree | 488539656f842787c387b6fecbe2242e71f24763 /Objects | |
parent | b183750f999953bac7738b1fff114e0a2615d970 (diff) | |
download | cpython-git-da15389fddb85cf8a97b81e75de7d77b5f505b56.tar.gz |
Fix a possible crash in range.__reversed__(). (GH-10252)
(cherry picked from commit c9a6168924ffa4f3f78175998b392fe23d3edc50)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
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 e4f778b1f8..037be870e3 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; |