This commit is contained in:
Raymond Hettinger 2015-08-26 08:09:50 -07:00
commit 7a1a0bbbf1
3 changed files with 10 additions and 0 deletions

View file

@ -924,6 +924,8 @@ deque_index(dequeobject *deque, PyObject *args)
if (stop < 0)
stop = 0;
}
if (stop > Py_SIZE(deque))
stop = Py_SIZE(deque);
for (i=0 ; i<stop ; i++) {
if (i >= start) {