Commit Graph

12 Commits

Author SHA1 Message Date
Rasmus Lerdorf
4a205092f7 Trivial Coverity fix 2013-10-19 17:55:34 -07:00
Gustavo Lopes
710150ccb7 socket: support unix paths in the abstract namespace
Those starting with '\0'.
2013-07-15 23:57:51 +02:00
Gustavo Lopes
e2744f1aa3 socket: fix bug #65260 (SCM_RIGHTS)
The data for messages of type SOL_SOCKET/SCM_RIGHTS was not being
passed correctly. There were actually two bugs: (1) the number of file
descriptors being passed was being read incorrectly (the length of the
cmsg array was being read instead of that of its 'data' element), as a
result it was generally being reported as always three elements
('level', 'type' and 'data') and (2) the allocated block for writing
the file descriptors was being acessed incorrectly because a 1-based
counter was being used as if it was 0-based.

Any of these two bugs would probably be enough to cause heap
corruption.
2013-07-15 23:57:49 +02:00
Gustavo Lopes
8687332e08 Fix bug #64506: fix build with --disable-ipv6 2013-05-08 19:58:27 +02:00
Gustavo Lopes
608254fa57 Fix non-Windows build 2013-02-02 16:38:09 +01:00
Gustavo Lopes
7066cc7267 send/recvmsg() support for Windows 2013-02-02 16:38:09 +01:00
Gustavo Lopes
95f8d34f9c Revert "Payload of HOPLIMIT/TCLASS are 8-bit"
This reverts commit 61a5ec7381ba5388a52926779fe3f58af0caea83.

I checked Linux and OpenBSD and both use integers to write the
IPV6_TCLASS messages and they don't force any endianness. This is
despite RFC 3542 explicitly saying the first byte of cmsg_data will
have the result. In any case, it doesn't make any difference in
little-endian archs.
2013-02-02 16:38:08 +01:00
Gustavo Lopes
5c0a8b1a2a Ensure memory is initialized 2013-02-02 16:38:08 +01:00
Gustavo Lopes
f10baf14ed Payload of HOPLIMIT/TCLASS are 8-bit 2013-02-02 16:38:08 +01:00
Gustavo Lopes
c846fcef68 Fix buf in string -> int conv. 2013-02-02 16:38:08 +01:00
Gustavo Lopes
bd580db373 Build fixes; accept names for if_index 2013-02-02 16:38:08 +01:00
Gustavo Lopes
4414b33abd Refactoring: move stuff to new conversions.c 2013-02-02 16:38:08 +01:00