Mark Dickinson <dicki...@gmail.com> added the comment:

Thanks.  Yes, that fix seems to work.  I also tried rewriting the suspect test 
as

if (step >= Py_SIZE(self) - cur)

but this produced a different failure:  it looks like there's more than one 
point with potential overflow for cur.  Not to mention that the 'cur += step' 
in the for loop can produce undefined behaviour.

So making cur unsigned looks like the right solution here.

It would be good to review the rest of this function for similar problems while 
we're fixing this.

----------

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

Reply via email to