summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-03-05 17:03:30 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-03-05 17:03:30 +0000
commit5acb4d37c044cf18c90092eacd923a48afbe87a9 (patch)
treef00bea6d8e560b679eee5e4b4dd9569e42ef8fd9
parentac0423dfb651ac6865663a328484e55f0e6f2c10 (diff)
downloadATCD-5acb4d37c044cf18c90092eacd923a48afbe87a9.tar.gz
ChangeLogTag: Wed Mar 5 11:00:51 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp10
2 files changed, 17 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 91fae7747cd..9daa5e6d372 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Wed Mar 5 11:00:51 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * tao/IIOP_Acceptor.cpp:
+
+ Fixed the portspan overflow problem. The port is restricted to
+ unsigned short but the port span plus the port could easily
+ overflow. So, it's now silently restricted to
+ ACE_MAX_DEFAULT_PORT. Thanks to Duane Binder
+ <duane.binder@veritas.com> for providing this fix.
+
Wed Mar 5 10:21:54 2003 Chad Elliott <elliott_c@ociweb.com>
* tao/GIOP_Message_Lite.cpp (parse_incoming_messages):
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 87758d9c7b4..705c8a05f62 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -484,9 +484,13 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
ACE_INET_Addr a(addr);
int found_a_port = 0;
- u_short last_port = requested_port + this->port_span_;
+ ACE_UINT32 last_port = requested_port + this->port_span_ - 1;
+ if (last_port > ACE_MAX_DEFAULT_PORT)
+ {
+ last_port = ACE_MAX_DEFAULT_PORT;
+ }
- for (u_short p = requested_port; p < last_port; p++)
+ for (ACE_UINT32 p = requested_port; p <= last_port; p++)
{
if (TAO_debug_level > 5)
ACE_DEBUG ((LM_DEBUG,
@@ -494,7 +498,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
ACE_TEXT ("trying to listen on port %d\n"), p));
// Now try to actually open on that port
- a.set_port_number (p);
+ a.set_port_number ((u_short)p);
if (this->base_acceptor_.open (a,
reactor,
this->creation_strategy_,