[issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses

David Watson report at bugs.python.org
Sun Sep 12 23:30:51 CEST 2010

David Watson <baikie at users.sourceforge.net> added the comment:

I meant to say that FreeBSD provides the SUN_LEN macro, but it
turns out that Linux does as well, and its version behaves the
same as FreeBSD's.  The FreeBSD man pages state that the
terminating null is not part of the address:


The examples in Stevens/Rago's "Advanced Programming in the Unix
Environment" also pass address lengths to bind(), etc. that do
not include the null.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list