summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog7
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp13
2 files changed, 16 insertions, 4 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index c0335abf6f5..6804e418e97 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,10 @@
+Wed Sep 20 21:02:14 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tao/IIOP_Acceptor.cpp:
+
+ Make sure the port_separator_loc value is used to compute the
+ string length only when it is not 0.
+
Wed Sep 20 01:10:58 UTC 2006 Iliyan Jeliazkov <iliyan@ociweb.com>
* tao/default_resource.cpp:
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 32744f4cbe2..f701b438222 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -705,10 +705,15 @@ TAO_IIOP_Acceptor::parse_address (const char *address,
}
else if (!host_defaulted)
{
- // Extract out just the host part of the address.
- size_t const len = port_separator_loc - address;
- ACE_OS::memcpy (tmp_host, address, len);
- tmp_host[len] = '\0';
+ if (port_separator_loc != 0)
+ {
+ // Extract out just the host part of the address.
+ size_t const len = port_separator_loc - address;
+ ACE_OS::memcpy (tmp_host, address, len);
+ tmp_host[len] = '\0';
+ }
+ else
+ ACE_OS::strcpy (tmp_host, address);
}
#endif /* ACE_HAS_IPV6 */
if (!ipv6_in_host && !host_defaulted)