summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLog23
-rw-r--r--TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp2
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Task.cpp7
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp7
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h2
-rw-r--r--TAO/utils/logWalker/GIOP_Buffer.cpp12
-rw-r--r--TAO/utils/logWalker/Log.cpp8
7 files changed, 50 insertions, 11 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 972b780aca5..29f108da5a4 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,26 @@
+Fri Feb 8 22:28:42 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * tao/Dynamic_TP/DTP_ORBInitializer.cpp:
+
+ Fix Coverity 972925. Unchecked dynamic cast.
+
+ * tao/Dynamic_TP/DTP_Task.cpp:
+
+ Fix Coverity 972742. Unintialized members.
+
+ * tao/PortableServer/ServantRetentionStrategyNonRetain.h:
+ * tao/PortableServer/ServantRetentionStrategyNonRetain.cpp:
+
+ Fix Coverity 972992. Stray pointer arethmetic.
+
+ * utils/logWalker/GIOP_Buffer.cpp:
+
+ Fix Coverity 972917. Logically dead code.
+
+ * utils/logWalker/Log.cpp:
+
+ Fix Coverity 972930. Potential null dereference.
+
Fri Feb 8 21:43:54 UTC 2013 Phillip LaBanca <labancap@ociweb.com>
* orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Naming_Server.cpp:
diff --git a/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp b/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
index d193c3b54ea..f71f499527f 100644
--- a/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
@@ -105,7 +105,7 @@ TAO_DTP_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
TAO_DTP_Definition def;
- if (!config_registry->find(dtp_name, def))
+ if (config_registry == 0 || !config_registry->find(dtp_name, def))
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
diff --git a/TAO/tao/Dynamic_TP/DTP_Task.cpp b/TAO/tao/Dynamic_TP/DTP_Task.cpp
index 1bf26470c51..181325fa050 100644
--- a/TAO/tao/Dynamic_TP/DTP_Task.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Task.cpp
@@ -23,7 +23,12 @@ TAO_DTP_Task::TAO_DTP_Task ()
accepting_requests_ (false),
shutdown_ (false),
opened_ (false),
- num_queue_requests_ ((size_t)0)
+ num_queue_requests_ ((size_t)0),
+ init_pool_threads_ ((size_t)0),
+ min_pool_threads_ ((size_t)0),
+ max_pool_threads_ ((size_t)0),
+ max_request_queue_depth_ ((size_t)0),
+ thread_stack_size_ ((size_t)0)
{
}
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
index de26ec8ee98..962fc090cc7 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.cpp
@@ -210,11 +210,10 @@ namespace TAO
long count = this->sys_id_count_++;
ACE_Time_Value now = ACE_OS::gettimeofday();
- *reinterpret_cast<ACE_UINT32 *>(sys_id->get_buffer()) =
- count;
+ ACE_UINT32 *id_ptr = reinterpret_cast<ACE_UINT32 *>(sys_id->get_buffer());
- *reinterpret_cast<ACE_UINT32 *>(sys_id->get_buffer() + 4) =
- static_cast<ACE_UINT32>(now.sec());
+ *(id_ptr++) = count;
+ *id_ptr = static_cast<ACE_UINT32>(now.sec());
system_id = sys_id;
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
index 6870c1e018c..7cbc90ec2e7 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
@@ -125,7 +125,7 @@ namespace TAO
protected:
TAO_Root_POA *poa_;
- ACE_Atomic_Op<TAO_SYNCH_MUTEX,long> sys_id_count_;
+ ACE_Atomic_Op<TAO_SYNCH_MUTEX,ACE_UINT32> sys_id_count_;
};
}
}
diff --git a/TAO/utils/logWalker/GIOP_Buffer.cpp b/TAO/utils/logWalker/GIOP_Buffer.cpp
index f58c36cdb32..b89baedadae 100644
--- a/TAO/utils/logWalker/GIOP_Buffer.cpp
+++ b/TAO/utils/logWalker/GIOP_Buffer.cpp
@@ -166,12 +166,16 @@ GIOP_Buffer::GIOP_Buffer(const char *text,
header_parsed_ (false),
payload_start_ (0)
{
- const char *size_str = ACE_OS::strstr(text, size_leadin) + leadin_len;
- const char *id = size_str == 0 ? 0 : ACE_OS::strchr(size_str, '[') + 1;
+ const char *size_str = ACE_OS::strstr(text, size_leadin);
+ if (size_str != 0)
+ {
+ size_str += 4;
+ this->expected_size_ = ACE_OS::strtol(size_str, 0, 10);
+ const char *id = ACE_OS::strchr(size_str, '[') + 1;
+ this->expected_req_id_ = ACE_OS::strtol(id, 0, 10);
+ }
this->sending_ = ACE_OS::strstr(text,"send") ? 0 : 1;
this->expected_type_ = ACE_OS::strstr(text,"Request") ? 0 : 1;
- this->expected_size_ = ACE_OS::strtol(size_str, 0,10);
- this->expected_req_id_ = ACE_OS::strtol(id, 0, 10);
const char *time_tok = ACE_OS::strchr (text,'@');
if (time_tok != 0)
{
diff --git a/TAO/utils/logWalker/Log.cpp b/TAO/utils/logWalker/Log.cpp
index b54e4e22301..783b5ac63e3 100644
--- a/TAO/utils/logWalker/Log.cpp
+++ b/TAO/utils/logWalker/Log.cpp
@@ -463,6 +463,14 @@ Log::parse_cleanup_queue_i (void)
char *hpos = ACE_OS::strchr(this->info_,'[');
long handle = ACE_OS::strtol(hpos+1,0,10);
PeerProcess *pp = this->hostproc_->find_peer(handle);
+ if (pp == 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "%d: cleanup queue, error parsing %C, can't find peer "
+ "for handle %d, text = %s\n",
+ this->offset_, this->origin_.c_str(), handle, this->info_));
+ return;
+ }
Thread *original_thr = this->thr_;
GIOP_Buffer *target = original_thr->giop_target();