diff options
| -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. |
