]> granicus.if.org Git - python/commit
Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`)
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 17 Jan 2010 12:26:20 +0000 (12:26 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 17 Jan 2010 12:26:20 +0000 (12:26 +0000)
commite80a6a4ead1da87d2a4149bfcbb95c1a3320dbc2
tree8fd4b9d3e430610e4fea82bbc2974bca013d0c6a
parentaee900338e76c9d0879bf9470bc3be7912b11817
Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`)
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL.  The macro now returns a statically allocated empty
string instead.
Include/bytearrayobject.h
Lib/test/test_bytes.py
Misc/NEWS
Objects/bytearrayobject.c