Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initialize msg_name with null pointer when msg_name is empty (nix-rus…
…t#2530) * Use as_mut_ptr() to initialize msg_name in pack_mhdr_to_receive The msg_name field points to a caller-allocated buffer that is used to return the source address if the socket is unconnected. The caller should set msg_namelen to the size of this buffer before this call; upon return from a successful call, msg_namelen will contain the length of the returned address. If the application does not need to know the source address, msg_name can be specified as NULL. In case we use () msgname_len gets initialized with 0, but a dangling pointer to the array with msg_name. This works for the first iteration somehow, but after that kernel sets msgname_len to a non-zero and second invocation with the same MultiHeader fails Fixes nix-rust#2506 * CI doesn't check for rustfmt but I'm tired of picking stuff
- Loading branch information