diff options
| author | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-02-13 14:05:51 +0100 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-02-25 13:37:41 +0100 |
| commit | 405a774e3ffa559408e582521caac8492b097655 (patch) | |
| tree | 194cc9e45e709fc1736468d3166ecda23767b508 | |
| parent | c7b8c7f5c2655b4bff6819b607f7fec71e3c14ac (diff) | |
| download | mullvadvpn-405a774e3ffa559408e582521caac8492b097655.tar.xz mullvadvpn-405a774e3ffa559408e582521caac8492b097655.zip | |
Fix safety comment position in talpid-routing::unix::macos::data
| -rw-r--r-- | talpid-routing/src/unix/macos/data.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/talpid-routing/src/unix/macos/data.rs b/talpid-routing/src/unix/macos/data.rs index 5ac83d0885..54fea3aaf9 100644 --- a/talpid-routing/src/unix/macos/data.rs +++ b/talpid-routing/src/unix/macos/data.rs @@ -858,15 +858,15 @@ impl RouteSocketAddress { // the smallest size being 4 bytes. let buffer_size = len + len % 4; let mut buffer = vec![0u8; buffer_size]; + // SAFETY: copying contents of addr into buffer is safe, as long as addr.len() + // returns a correct size for the socket address pointer. unsafe { - // SAFETY: copying conents of addr into buffer is safe, as long as addr.len() - // returns a correct size for the socket address pointer. std::ptr::copy_nonoverlapping( addr.as_ptr() as *const _, buffer.as_mut_ptr(), len, - ); - } + ) + }; buffer } } |
