diff options
author | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-08 19:27:27 +0000 |
---|---|---|
committer | harrisb <harrisb@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-02-08 19:27:27 +0000 |
commit | 54fc7e4a68772ecd2dc64b8a4eff344c6929a40b (patch) | |
tree | 5e58f3a52eafc96ba8921b352af4ab93312b6e81 | |
parent | 30c14a6d30f594cd6197e7ab51d54af4c8189995 (diff) | |
download | ATCD-54fc7e4a68772ecd2dc64b8a4eff344c6929a40b.tar.gz |
Fri Feb 8 19:25:49 UTC 2013 Byron Harris <harrisb@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 26 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Invocation_Retry_State.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Storable_File_Guard.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/Storable/test.cpp | 8 |
7 files changed, 68 insertions, 8 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 4db9631413c..48a6a3a4bc5 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,29 @@ +Fri Feb 8 19:25:49 UTC 2013 Byron Harris <harrisb@ociweb.com> + + * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp: + + Fix Coverity 972923. Unchecked dynamic_cast. + + * orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp: + + Fix Coverity 972924. Unchecked dynamic_cast. + + * orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp: + + Fix Coverity 972907. Unchecked return value. + + * tao/Invocation_Retry_State.cpp: + + Fix Coverity 972908. Unchecked return value. + + * tao/Storable_File_Guard.cpp: + + Fix Coverity 972943. Uninitialized pointer field. + + * tests/Storable/test.cpp: + + Fix Coverity 972939. Uncaught exception. + Fri Feb 8 19:10:05 UTC 2013 Phillip LaBanca <labancap@ociweb.com> * orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp: diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp index 90074e3e939..3e982c66621 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_PG_Group_Factory.cpp @@ -43,7 +43,7 @@ TAO::FT_PG_Group_Factory::set_object_group_stale ( if (group_info.change_type == FT_Naming::DELETED) change_type_str = "deleted"; ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("%T %n (%P|%t) - ") + ACE_TEXT ("%T %n (%P|%t) - FT_PG_Group_Factory: ") ACE_TEXT ("Setting list store as stale "), ACE_TEXT ("because of group with ID %lld "), ACE_TEXT ("was %s"), @@ -61,6 +61,15 @@ TAO::FT_PG_Group_Factory::set_object_group_stale ( FT_PG_Object_Group_Storable * og = dynamic_cast<FT_PG_Object_Group_Storable *> (group); + if (!og) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%T %n (%P|%t) - FT_PG_Group_Factory ") + ACE_TEXT ("In setting object group stale could not cast ") + ACE_TEXT ("to FT_PG_Object_Group_Storable\n"))); + throw CORBA::INTERNAL (); + } + if (TAO_debug_level > 3) { ACE_DEBUG ((LM_DEBUG, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index 312b951d873..0680c1acb6a 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -265,9 +265,21 @@ int TAO::PG_Group_Factory::destroy_group (PortableGroup::ObjectGroupId group_id) { PG_Object_Group_Storable *og = dynamic_cast<PG_Object_Group_Storable *> (group); - og->set_destroyed (true); - result = (this->list_store_->remove (group->get_object_group_id ()) - == 0); + if (!og) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%T %n (%P|%t) - PG_Group_Factory ") + ACE_TEXT ("In destroying group could not cast ") + ACE_TEXT ("to PG_Object_Group_Storable\n"))); + result = 0; + } + else + { + og->set_destroyed (true); + result = (this->list_store_->remove (group->get_object_group_id ()) + == 0); + } + } if (result) delete group; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp index ddc7a6811f3..4c5a9cf0413 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_List_Store.cpp @@ -263,7 +263,8 @@ TAO::PG_Group_List_Store::list_obsolete () ACE_Auto_Ptr<TAO::Storable_Base> stream (this->create_stream ("r")); if (!stream->exists ()) throw CORBA::INTERNAL (); - stream->open (); + if (stream->open () != 0) + throw CORBA::INTERNAL (); return this->is_obsolete (stream->last_changed ()); } diff --git a/TAO/tao/Invocation_Retry_State.cpp b/TAO/tao/Invocation_Retry_State.cpp index 7204250846a..016060495c5 100644 --- a/TAO/tao/Invocation_Retry_State.cpp +++ b/TAO/tao/Invocation_Retry_State.cpp @@ -155,7 +155,11 @@ TAO::Invocation_Retry_State::forward_on_reply_closed_increment () void TAO::Invocation_Retry_State::next_profile_retry (TAO_Stub &stub) const { - stub.next_profile_retry (); + if (!stub.next_profile_retry ()) + { + stub.reset_profiles (); + } + this->sleep_at_starting_profile (stub); } diff --git a/TAO/tao/Storable_File_Guard.cpp b/TAO/tao/Storable_File_Guard.cpp index d2f77555e02..0986c8c4394 100644 --- a/TAO/tao/Storable_File_Guard.cpp +++ b/TAO/tao/Storable_File_Guard.cpp @@ -16,8 +16,10 @@ TAO::Storable_File_Guard:: Storable_File_Guard (bool redundant, bool use_backup) - : redundant_(redundant) + : fl_(0) + , redundant_(redundant) , closed_(1) + , rwflags_(0) , use_backup_(use_backup) { } diff --git a/TAO/tests/Storable/test.cpp b/TAO/tests/Storable/test.cpp index d9f74cb7763..76b561dd7e9 100644 --- a/TAO/tests/Storable/test.cpp +++ b/TAO/tests/Storable/test.cpp @@ -14,9 +14,9 @@ #include "Savable.h" #include "tao/Storable_FlatFileStream.h" +#include "tao/SystemException.h" #include "ace/Get_Opt.h" - #include "ace/OS_NS_unistd.h" #include <iostream> @@ -184,5 +184,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) exit_status = 1; } + catch (CORBA::PERSIST_STORE &) + { + std::cout << "CORBA::PERSIST_STORE thrown" << std::endl; + exit_status = 1; + } + return exit_status; } |