Fix a possible crash in range.__reversed__(). (GH-10252)

This commit is contained in:
Zackery Spytz 2018-10-31 03:13:16 -06:00 committed by Serhiy Storchaka
parent 0353b4eaaf
commit c9a6168924

View File

@ -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;