The socket address used in unix domain socket connections should include a null
byte suffix, and additionally this should be counted and included in the socket
address length. Thus the length will be the length of the path plus two for the
address family plus one for the null suffix.
This behaviour is documented in unix(7) on my system and in Stevens (Unix
Network Programming, Vol 1).
(Background: This came to my attention when I was experimenting with abstract
sockets on Linux. In abstract domain sockets, the null byte is a prefix to the
path _instead_ of a suffix, and must of course be counted.)
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
I believe commit 960902584a3ef125946beb5ebe331b54d697e9d9 (from bug #15677) has fixed this, too.