summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ACE/ace/UNIX_Addr.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ACE/ace/UNIX_Addr.cpp b/ACE/ace/UNIX_Addr.cpp
index 9ce195f5f27..460c58fc4b1 100644
--- a/ACE/ace/UNIX_Addr.cpp
+++ b/ACE/ace/UNIX_Addr.cpp
@@ -41,6 +41,10 @@ ACE_UNIX_Addr::string_to_addr (const char addr[])
{
ACE_OS::strsncpy (this->unix_addr_.sun_path, addr,
sizeof this->unix_addr_.sun_path);
+
+ this->set_size (sizeof this->unix_addr_ -
+ sizeof (this->unix_addr_.sun_path) +
+ ACE_OS::strlen (this->unix_addr_.sun_path));
return 0;
}
@@ -71,7 +75,8 @@ ACE_UNIX_Addr::dump (void) const
// Do nothing constructor.
ACE_UNIX_Addr::ACE_UNIX_Addr (void)
- : ACE_Addr (AF_UNIX, sizeof this->unix_addr_)
+ : ACE_Addr (AF_UNIX,
+ sizeof this->unix_addr_ - sizeof (this->unix_addr_.sun_path))
{
(void) ACE_OS::memset ((void *) &this->unix_addr_,
0,