[issue27507] bytearray.extend lacks overflow check when increasing buffer
Xiang Zhang
report at bugs.python.org
Sat Jul 16 11:51:14 EDT 2016
Xiang Zhang added the comment:
I can't totally agree the point. The code means every time we increase the buffer by half the current length. So when the length arrives 2/3 * PY_SSIZE_T_MAX it's going to overflow. There is a 1/3 * PY_SSIZE_T_MAX gap between the theoretical upper limit. I think leaving such a gap and exiting is somewhat too rude. So in such case I make it have a try.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27507>
_______________________________________
More information about the Python-bugs-list
mailing list