If MSG_CTRUNC is set, it is not safe to iterate the cmsgs, since they could have been truncated. Change RecvMsg::cmsgs() to return a Result, and to check for this flag (an API change).
Update tests for API change. Add test for too-small buffer.
fixes #2400
Checklist:
[x] I have read CONTRIBUTING.md
[x] I have written necessary tests and rustdoc comments
[x] A change log has been added if this PR modifies nix's API
If MSG_CTRUNC is set, it is not safe to iterate the cmsgs, since they could have been truncated. Change
RecvMsg::cmsgs()
to return aResult
, and to check for this flag (an API change).Update tests for API change. Add test for too-small buffer.
fixes #2400
Checklist:
CONTRIBUTING.md