Fix: check for sizeof sa_family to save sa_family in accept and connect
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Aug 2016 04:18:29 +0000 (00:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 Aug 2016 15:33:10 +0000 (11:33 -0400)
The check of addrlen >= sizeof(struct sockaddr) is too restrictive
and causes sa_family to not be saved in the case of AF_UNIX sockets
as the addrlen returned by the syscall may be only sizeof(short).

Individual checks per socket family are performed anyhow in the
switch case, making this safe.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.02664 seconds and 5 git commands to generate.