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:34:51 +0000 (11:34 -0400)
commitf6083fac0dc508bc35fc55ce2414236d0984525e
treeb92efc074d0a3aa372cdf871f9b418928b81709d
parentd549e5c16e4ffe57d99ce0eb55cc0d34679d48a5
Fix: check for sizeof sa_family to save sa_family in accept and connect

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>
instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h
This page took 0.025815 seconds and 4 git commands to generate.