summaryrefslogtreecommitdiff
path: root/TAO/utils
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-02-08 22:36:59 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-02-08 22:36:59 +0000
commitb5d9f373360cc6b7d57e3a415f1b157c9b5a24a3 (patch)
tree848a68aff45dd28a15d48c453fa3804cabcf4027 /TAO/utils
parentd0bed7b0df5bf66fe49dee5e8e26c970eb323130 (diff)
downloadATCD-b5d9f373360cc6b7d57e3a415f1b157c9b5a24a3.tar.gz
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.
Diffstat (limited to 'TAO/utils')
-rw-r--r--TAO/utils/logWalker/GIOP_Buffer.cpp12
-rw-r--r--TAO/utils/logWalker/Log.cpp8
2 files changed, 16 insertions, 4 deletions
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();