diff options
| author | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-02-13 14:06:13 +0100 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2025-02-25 13:37:41 +0100 |
| commit | 0574ffd7a0f9aedbac92832d37c99a72c829e3dd (patch) | |
| tree | cc677a77bea31ec0cfc4d3fe2a9453176144d52e | |
| parent | 405a774e3ffa559408e582521caac8492b097655 (diff) | |
| download | mullvadvpn-0574ffd7a0f9aedbac92832d37c99a72c829e3dd.tar.xz mullvadvpn-0574ffd7a0f9aedbac92832d37c99a72c829e3dd.zip | |
Fix math in talpid-routing::unix::macos::data (?)
| -rw-r--r-- | talpid-routing/src/unix/macos/data.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/talpid-routing/src/unix/macos/data.rs b/talpid-routing/src/unix/macos/data.rs index 54fea3aaf9..9d36f01bf6 100644 --- a/talpid-routing/src/unix/macos/data.rs +++ b/talpid-routing/src/unix/macos/data.rs @@ -856,7 +856,7 @@ impl RouteSocketAddress { // The "serialized" socket addresses must be padded to be aligned to 4 bytes, with // the smallest size being 4 bytes. - let buffer_size = len + len % 4; + let buffer_size = len.next_multiple_of(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. |
