summaryrefslogtreecommitdiff
path: root/ace/FILE_Addr.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-06-16 21:21:16 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-06-16 21:21:16 +0000
commit4c9099e9b035fc7d56e22f68110128783e7aec3f (patch)
treefaff663bda8064415858a9317b99778a98f7660e /ace/FILE_Addr.cpp
parent4bae26cfab655771eba59c8e4dfc18592a86901b (diff)
downloadATCD-4c9099e9b035fc7d56e22f68110128783e7aec3f.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/FILE_Addr.cpp')
-rw-r--r--ace/FILE_Addr.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/ace/FILE_Addr.cpp b/ace/FILE_Addr.cpp
index 29095b31577..108b8c99f0e 100644
--- a/ace/FILE_Addr.cpp
+++ b/ace/FILE_Addr.cpp
@@ -44,9 +44,14 @@ ACE_FILE_Addr &
ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa)
{
if (this != &sa)
- (void) ACE_OS::memcpy ((void *) &this->filename_,
- (void *) &sa.filename_,
- sa.get_size ());
+ {
+ size_t size = sa.get_size ();
+ (void) ACE_OS::memcpy ((void *) &this->filename_,
+ (void *) &sa.filename_,
+ size);
+ if (size < MAXNAMLEN + 1)
+ this->filename_[size] = '\0';
+ }
return *this;
}