[issue25270] codecs.escape_encode systemerror on empty byte string

Marc-Andre Lemburg report at bugs.python.org
Thu Oct 1 09:40:46 CEST 2015


Marc-Andre Lemburg added the comment:

On 30.09.2015 15:11, Serhiy Storchaka wrote:
> May be better to test a condition "size > 0" before calling _PyBytes_Resize(), as in many other case where _PyBytes_Resize() is used.
> 
> Or accept shared objects in _PyBytes_Resize() if new size is equal to old size. This will allow to getrid of additional tests before calling _PyBytes_Resize().

Agreed. It would be good to make _PyBytes_Resize() more robust for
shared objects.

----------

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


More information about the Python-bugs-list mailing list