nix
nix copied to clipboard
Don't deref uninit addrs in `pack_mhdr_to_receive`
trafficstars
This adds a new method to SockaddrLikePriv to get a pointer to some underlying libc::sockaddr from a pointer to some type. This avoids dereferencing uninitialized values during pack_mhdr_to_receive, which is called from MultiHeaders::preallocate and recvmsg.
Because this is a private trait, this is not a semver-breaking change.
Fixes #1990
Can we get this rolled into a release?
This UB was introduced in https://github.com/nix-rust/nix/pull/1684. Maybe @asomers would be interested in reviewing it?
Ping! @asomers, could we get this merged in?