Martin Panter added the comment:

Posting a new patch which combines both fixes and adds some test cases. However 
the test needs Python to be built with “./configure --with-pydebug” to detect 
the buffer overrun; without this the test will probably silently pass.

I removed the offending buffer space check, and let it always call 
PyBufferArray_Resize(). I also looked around the bytearray module for similar 
errors for other operations but I couldn’t find any. The other cases already 
tend to always call PyByteArray_Resize().

----------
Added file: http://bugs.python.org/file39432/bytearray-fixes.v2.patch

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

Reply via email to