connection: fix buffer-overflow in build_cmsg()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Thu, 11 Oct 2012 21:37:48 +0000 (23:37 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 15 Oct 2012 20:23:38 +0000 (16:23 -0400)
commit0b399b8d68b92627525c01e787d0b98b169b604c
tree93000ea78bf6da675a23c216ddd394d787356e4e
parent5bae0650baa400273720d7f5953536f99969d6ef
connection: fix buffer-overflow in build_cmsg()

Same problem as we had with close_fds(). We cannot rely on the fds_out
buffer being filled with less than MAX_FDS_OUT file descriptors.
Therefore, write at most MAX_FDS_OUT file-descriptors to the outgoing
buffer.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/connection.c