]> jfr.im git - irc/charybdis-ircd/charybdis.git/commit
librb: commio: Must set addrlen before every call to accept()
authorSimon Arlott <sa.me.uk>
Sat, 29 Jul 2017 20:38:34 +0000 (21:38 +0100)
committerSimon Arlott <sa.me.uk>
Sat, 29 Jul 2017 21:20:05 +0000 (22:20 +0100)
commitb0adc7bf978d764bffd22af0697cff90e49a62a5
tree6e85594ece4c19521b6f296499a755698dcbea7b
parent8467fd9cafd07368217a9af4c7b9b71556130c1b
librb: commio: Must set addrlen before every call to accept()

If an IPv4 connection is dropped by the pre-callback, and there is a
pending IPv6 connection on the same listening socket then the retried
accept() will be unable to populate `st` because `addrlen` will be too
small. Also initialise `st` each time to avoid a clang static analysis
warning.
librb/src/commio.c