Sebastian Hagen <sh_pyb...@memespace.net> added the comment:

You're correct about PyUnicode_FSConverter(), which is why the very
first part of my patch fixes that function. Only fixing that one will
get rid of the segfaults, but also lead to incorrect error reporting for
the zero-length bytearray case; the bytes2str() modification is to get
the right exceptions.

I don't know which precise semantics PyByteArray_AS_STRING() is
*supposed* to have. I assumed it returning NULL was normal for
0-byte-length arrays, and based my patch off of that.

----------

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

Reply via email to