Raymond Hettinger added the comment:

I would think that the PY_SSIZE_T_MAX check belongs inside the:

    if (result != NULL) {
        it->it_index++;
        return result;
    }

just before the increment which could cause the overflow.  Also, PY_SSIZE_T_MAX 
is a valid value to pass to PySequence_GetItem(), so it shouldn't be blocked 
unless necessary.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22939>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to