#3255: malformed unix socket filename ---------------------------------+------------------------------------------ Reporter: kaliber | Owner: bonefish Type: bug | Status: new Priority: normal | Milestone: R1 Component: Network & Internet | Version: R1/pre-alpha1 Resolution: | Keywords: Blockedby: | Platform: All Blocking: | ---------------------------------+------------------------------------------ Comment(by bonefish): I guess I would still consider the sample code invalid. [http://www.opengroup.org/onlinepubs/9699919799/functions/bind.html bind()]'s ''address_len'' parameter "Specifies the length of the sockaddr structure pointed to by the address argument." I would interpret that to mean {{{sizeof(sockaddr_un)}}} in this case. The sun_len field doesn't have to be set. It will be ignored anyway (not doing so would break POSIX compliant programs). That being said it certainly wouldn't harm to consider the address size passed as a limit. Currently the address is copied into a a sockaddr_storage and {{{strnlen(..., sizeof(sockaddr_un))}}} is used to determine the actual length of the address. Furthermore the value the unix module writes to the sun_len field actually includes the terminating null, which other OSs don't include. And finally the SUN_LEN() macro could be added to <sys/un.h> (several other OSs have it). To sum it up, while I think the reported problem is invalid I'll leave the ticket open for sake of the related issues/features. -- Ticket URL: <http://dev.haiku-os.org/ticket/3255#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.