We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 327cb39 commit bf85a1aCopy full SHA for bf85a1a
library/std/src/os/unix/net/ancillary.rs
@@ -464,6 +464,9 @@ impl<'a> SocketAncillary<'a> {
464
/// All data written to the buffer must be valid ancillary data for the target platform,
465
/// and you must call [`set_len()`](Self::set_len) after changing
466
/// the buffer contents to update the internal bookkeeping.
467
+ ///
468
+ /// Make sure to zero-initialize the buffer if you are going to use it with [`libc::CMSG_NXTHDR()`].
469
+ /// That function requires the buffer to be zero-initialized in order to work correctly
470
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
471
pub unsafe fn buffer_mut(&mut self) -> &mut [MaybeUninit<u8>] {
472
self.buffer
0 commit comments