mirror of https://github.com/python/cpython
Fix a possible crash in range.__reversed__(). (GH-10252)
This commit is contained in:
parent
0353b4eaaf
commit
c9a6168924
|
@ -1154,6 +1154,7 @@ long_range:
|
||||||
it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type);
|
it = PyObject_New(longrangeiterobject, &PyLongRangeIter_Type);
|
||||||
if (it == NULL)
|
if (it == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
it->index = it->start = it->step = NULL;
|
||||||
|
|
||||||
/* start + (len - 1) * step */
|
/* start + (len - 1) * step */
|
||||||
it->len = range->length;
|
it->len = range->length;
|
||||||
|
|
Loading…
Reference in New Issue