summaryrefslogtreecommitdiff
path: root/ace/UNIX_Addr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/UNIX_Addr.cpp')
-rw-r--r--ace/UNIX_Addr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/ace/UNIX_Addr.cpp b/ace/UNIX_Addr.cpp
index 4ef4c22a1c9..4a0ed531b72 100644
--- a/ace/UNIX_Addr.cpp
+++ b/ace/UNIX_Addr.cpp
@@ -1,4 +1,3 @@
-// UNIX_Addr.cpp
// $Id$
#include "ace/UNIX_Addr.h"
@@ -92,12 +91,9 @@ ACE_UNIX_Addr::set (const char rendezvous_point[])
0,
sizeof this->unix_addr_);
this->unix_addr_.sun_family = AF_UNIX;
- size_t len = ACE_OS::strlen (rendezvous_point);
- size_t maxlen = sizeof this->unix_addr_.sun_path;
-
- (void) ACE_OS::memcpy (this->unix_addr_.sun_path,
- rendezvous_point,
- len >= maxlen ? maxlen - 1 : len);
+ (void) ACE_OS::strsncpy (this->unix_addr_.sun_path,
+ rendezvous_point,
+ sizeof this->unix_addr_.sun_path);
this->ACE_Addr::base_set (AF_UNIX,
sizeof this->unix_addr_ -