mirror of
https://github.com/passepartoutvpn/wireguard-apple.git
synced 2025-02-17 05:12:02 +00:00
According to [1], the `capacity` parameter is specified as "the number of instances of T in the re-bound region" and not the total size of the rebound struct. Without this patch, there are crashes in the extension with the following error: Fatal error: self must be a properly aligned pointer for types Pointee and T` Since the subsequent line in the code only reads `sizeof(in_addr)` or `sizeof(in6_addr)` anyway, change the `capacity` parameter to just be a count of 1. [1] https://developer.apple.com/documentation/swift/unsafepointer/withmemoryrebound(to:capacity:_:) Signed-off-by: John Biggs <john.biggs@proton.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> |
||
---|---|---|
.. | ||
Array+ConcurrentMap.swift | ||
DNSResolver.swift | ||
DNSServer.swift | ||
Endpoint.swift | ||
InterfaceConfiguration.swift | ||
IPAddress+AddrInfo.swift | ||
IPAddressRange.swift | ||
PacketTunnelSettingsGenerator.swift | ||
PeerConfiguration.swift | ||
PrivateKey.swift | ||
TunnelConfiguration.swift | ||
WireGuardAdapter.swift |