summaryrefslogtreecommitdiff
path: root/boost/asio/local/detail/impl/endpoint.ipp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 15:11:01 +0900
commit3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch)
tree5c1733853892b8397d67706fa453a9bd978d2102 /boost/asio/local/detail/impl/endpoint.ipp
parent88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff)
downloadboost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/asio/local/detail/impl/endpoint.ipp')
-rw-r--r--boost/asio/local/detail/impl/endpoint.ipp3
1 files changed, 2 insertions, 1 deletions
diff --git a/boost/asio/local/detail/impl/endpoint.ipp b/boost/asio/local/detail/impl/endpoint.ipp
index 4173a8242e..d668e8badc 100644
--- a/boost/asio/local/detail/impl/endpoint.ipp
+++ b/boost/asio/local/detail/impl/endpoint.ipp
@@ -109,7 +109,8 @@ void endpoint::init(const char* path_name, std::size_t path_length)
using namespace std; // For memcpy.
data_.local = boost::asio::detail::sockaddr_un_type();
data_.local.sun_family = AF_UNIX;
- memcpy(data_.local.sun_path, path_name, path_length);
+ if (path_length > 0)
+ memcpy(data_.local.sun_path, path_name, path_length);
path_length_ = path_length;
// NUL-terminate normal path names. Names that start with a NUL are in the