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

Stefan Krah report at bugs.python.org
Wed Dec 23 12:57:24 CET 2009


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

I briefly looked at how PyByteArray_AS_STRING() is used in other places.
A similar segfault can be provoked in long_new():

int(bytearray(b''), 10)


Then, there are a couple of places where pointer arithmetic is used with
the NULL pointer. Also, memcpy(x, NULL, 0) can occur. If I'm not
mistaken, both of these work in practice but are strictly speaking
undefined behavior.

----------

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


More information about the Python-bugs-list mailing list