Issue #23985: Fixed integer overflow in iterator object. Original patch by
Clement Rouault.
This commit is contained in:
parent
3220849524
commit
d43e928753
|
@ -1159,6 +1159,7 @@ Guido van Rossum
|
|||
Just van Rossum
|
||||
Hugo van Rossum
|
||||
Saskia van Rossum
|
||||
Clement Rouault
|
||||
Donald Wallace Rouse II
|
||||
Liam Routt
|
||||
Todd Rovito
|
||||
|
|
|
@ -10,6 +10,9 @@ What's New in Python 2.7.11?
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #23985: Fixed integer overflow in iterator object. Original patch by
|
||||
Clement Rouault.
|
||||
|
||||
- Issue #24102: Fixed exception type checking in standard error handlers.
|
||||
|
||||
Library
|
||||
|
|
|
@ -54,6 +54,11 @@ iter_iternext(PyObject *iterator)
|
|||
seq = it->it_seq;
|
||||
if (seq == NULL)
|
||||
return NULL;
|
||||
if (it->it_index == LONG_MAX) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"iter index too large");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
result = PySequence_GetItem(seq, it->it_index);
|
||||
if (result != NULL) {
|
||||
|
|
Loading…
Reference in New Issue