[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

Stefan Krah report at bugs.python.org
Tue Dec 22 18:54:25 CET 2009

Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Sorry that I missed the first part of your patch. I don't know exactly
what PyByteArray_AS_STRING() is meant to do either, but I think it would
make sense to return an empty string. This here works:

>>> bytes(bytearray(b''))


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list