Socket/Protocols: Fix BSDSocketAddress self-assignment
[senf.git] / Socket / Protocols / BSDSocketAddress.cci
index 30bb0e7..0c2499b 100644 (file)
@@ -118,7 +118,7 @@ prefix_ senf::BSDSocketAddress &
 senf::BSDSocketAddress::operator=(BSDSocketAddress const & other)
 {
     len_ = other.socklen();
-    ::memcpy(sockaddr_p(), other.sockaddr_p(), len_);
+    ::memmove(sockaddr_p(), other.sockaddr_p(), len_);
     return *this;
 }