[issue27507] bytearray.extend lacks overflow check when increasing buffer

Martin Panter report at bugs.python.org
Thu Jul 14 00:14:14 EDT 2016


Martin Panter added the comment:

It is possible to make an infinite iterable, e.g. iter(int, 1), so it is definitely worth checking for overflow. The patch looks okay to me. An alternative would be to raise the error without trying to allocate Py_SSIZE_T_MAX first, but I am okay with either way.

----------
nosy: +martin.panter
stage:  -> patch review
versions: +Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27507>
_______________________________________


More information about the Python-bugs-list mailing list