aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-10-31 03:13:16 -0600
committerSerhiy Storchaka <storchaka@gmail.com>2018-10-31 11:13:16 +0200
commitc9a6168924ffa4f3f78175998b392fe23d3edc50 (patch)
tree29b38d6e3123f1757e10930691b1946c9c260cd9 /Objects/rangeobject.c
parentbpo-33138: Change standard error message for non-pickleable and non-copyable ... (diff)
downloadcpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.gz
cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.tar.bz2
cpython-c9a6168924ffa4f3f78175998b392fe23d3edc50.zip
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 2b00a17425a..e7b47bde666 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;