summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2015-03-02 09:12:45 +0100
committerJohnny Willemsen <jwillemsen@remedy.nl>2015-03-02 09:12:45 +0100
commit8dd3c8372e291717b3d02c411fe63f2b365cdb9f (patch)
tree572c7132e1e668983a16a1215c5d5f0dc918a072
parentc9d1e750ed4b7f20ef9a15c6e001104797fb9e73 (diff)
downloadATCD-8dd3c8372e291717b3d02c411fe63f2b365cdb9f.tar.gz
Check for a nil pointer passed to string_to_ObjectId, resolves several Coverity reported errrors
-rw-r--r--TAO/tao/PortableServer/PortableServer_Functions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/TAO/tao/PortableServer/PortableServer_Functions.cpp b/TAO/tao/PortableServer/PortableServer_Functions.cpp
index 853bd2b7ea2..fe9c1f5f45a 100644
--- a/TAO/tao/PortableServer/PortableServer_Functions.cpp
+++ b/TAO/tao/PortableServer/PortableServer_Functions.cpp
@@ -9,6 +9,13 @@ namespace PortableServer
PortableServer::ObjectId *
string_to_ObjectId (const char *string)
{
+ // Passing in a nil pointer is illegal so throw an exception to
+ // indicate that
+ if (string == 0)
+ {
+ throw ::CORBA::BAD_PARAM ();
+ }
+
// Size of string
//
// We DO NOT include the zero terminator, as this is simply an