 
             port = "\(self.port!)"
         case .unixDomainSocket(let addr):
-            var address = addr.address
+            let address = addr.address
             host = nil
             type = "UDS"
             addressString = ""
-            port = withUnsafeBytes(of: &address.sun_path) { ptr in
-                let ptr = ptr.baseAddress!.bindMemory(to: UInt8.self, capacity: 104)
-                return String(cString: ptr)
+
+            // This is a static assert that exists just to verify the safety of the assumption below.
+            assert(Swift.type(of: address.sun_path.0) == CChar.self)
+            port = withUnsafePointer(to: address.sun_path) { ptr in
+                // Homogeneous tuples are always implicitly also bound to their element type, so this assumption below is safe.
+                let charPtr = UnsafeRawPointer(ptr).assumingMemoryBound(to: CChar.self)
+                return String(cString: charPtr)
             }
             return "[\(type)]\(port)"
         }

            hasher.combine(uds.address.sun_family)

            let pathSize = MemoryLayout.size(ofValue: uds.address.sun_path)
            withUnsafePointer(to: uds.address.sun_path) { pathPtr in
                // This `withMemoryRebound` is safe: we cannot violate Swift's pointer aliasing rules as this call cannot make
                // it back into Swift code.
                let length = pathPtr.withMemoryRebound(to: Int8.self, capacity: pathSize) {
                    strnlen($0, pathSize)
                }
                let bytes = UnsafeRawBufferPointer(start: UnsafeRawPointer(pathPtr), count: length)
                hasher.combine(bytes: bytes)
            }
        case .v4(let v4Addr):

//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
