You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix panic on dropping RecvAncillaryBuffer after failed recvmsg (#676)
* Fix panic on dropping `RecvAncillaryBuffer` after failed `recvmsg`
Calling drain on `RecvAncillaryBuffer`, including in its `Drop`
implementation was failing, with an "attempted to subtract with
overflow" error in `cvt_msg`.
If `recvmsg` returns `-1`, `msg_controllen` will not be updated by the
call. So it had a non-zero value as passed into the function, despite
there not being any control messages to parse.
* Clear any messages from `RecvAncillaryBuffer` at start of recv
This should prevent leaks of file descriptors if the `RecvAncillaryBuffer`
is re-used for multiple reads.
0 commit comments