Bug 7987

Summary: xtrans socket address is missing null byte suffix
Product: xorg Reporter: Alp Toker <alp>
Component: Lib/xtransAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: high CC: alan.coopersmith
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 10101, 15677    

Description Alp Toker 2006-08-24 16:06:49 UTC
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.)
Comment 1 Daniel Stone 2007-02-27 01:33:20 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 James Cloos 2008-04-25 13:17:41 UTC
I believe commit 960902584a3ef125946beb5ebe331b54d697e9d9 (from bug #15677) has fixed this, too.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.