summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2017-01-12 14:39:56 -0500
committerBernard Normier <bernard@zeroc.com>2017-01-12 14:39:56 -0500
commit21d56ef199fe0002c90b57d873878ac9ba4a32e1 (patch)
treea39441e45379a574beb6563cb5b5c34cdcdf5cb1 /cpp/src
parentRevert "Replaced Borders by Paddings to eliminate deprecation warnings" (diff)
downloadice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.bz2
ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.tar.xz
ice-21d56ef199fe0002c90b57d873878ac9ba4a32e1.zip
Reject empty endpoint in OA endpoint list
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index df7b4a81a77..e3b9cb2450c 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -1194,6 +1194,10 @@ Ice::ObjectAdapterI::parseEndpoints(const string& endpts, bool oaEndpoints) cons
beg = endpts.find_first_not_of(delim, end);
if(beg == string::npos)
{
+ if(!endpoints.empty())
+ {
+ throw EndpointParseException(__FILE__, __LINE__, "invalid empty object adapter endpoint");
+ }
break;
}
@@ -1242,17 +1246,14 @@ Ice::ObjectAdapterI::parseEndpoints(const string& endpts, bool oaEndpoints) cons
if(end == beg)
{
- ++end;
- continue;
+ throw EndpointParseException(__FILE__, __LINE__, "invalid empty object adapter endpoint");
}
string s = endpts.substr(beg, end - beg);
EndpointIPtr endp = _instance->endpointFactoryManager()->create(s, oaEndpoints);
if(endp == 0)
{
- EndpointParseException ex(__FILE__, __LINE__);
- ex.str = "invalid object adapter endpoint `" + s + "'";
- throw ex;
+ throw EndpointParseException(__FILE__, __LINE__, "invalid object adapter endpoint `" + s + "'");
}
endpoints.push_back(endp);