summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ReferenceFactory.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2007-04-27 08:31:47 +0000
committerMatthew Newhook <matthew@zeroc.com>2007-04-27 08:31:47 +0000
commit49e46bc0f64b88e16aa9c0ecd8c6ed10914e75d0 (patch)
tree26730fcae5d683183069533d5603425de1162e0c /cpp/src/Ice/ReferenceFactory.cpp
parentfile run.py was initially added on branch R3_2_branch. (diff)
downloadice-49e46bc0f64b88e16aa9c0ecd8c6ed10914e75d0.tar.bz2
ice-49e46bc0f64b88e16aa9c0ecd8c6ed10914e75d0.tar.xz
ice-49e46bc0f64b88e16aa9c0ecd8c6ed10914e75d0.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2118
Diffstat (limited to 'cpp/src/Ice/ReferenceFactory.cpp')
-rw-r--r--cpp/src/Ice/ReferenceFactory.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp
index b1eae949612..d84870e0d6f 100644
--- a/cpp/src/Ice/ReferenceFactory.cpp
+++ b/cpp/src/Ice/ReferenceFactory.cpp
@@ -503,6 +503,7 @@ IceInternal::ReferenceFactory::create(const string& str)
throw ex;
}
+ string adapterstr;
end = IceUtil::checkQuote(s, beg);
if(end == string::npos)
{
@@ -517,14 +518,24 @@ IceInternal::ReferenceFactory::create(const string& str)
{
end = s.size();
}
+ adapterstr = s.substr(beg, end - beg);
}
else
{
beg++; // Skip leading quote
+ adapterstr = s.substr(beg, end - beg);
+ end++; // Skip trailing quote.
}
+ // Check for trailing whitespace.
+ if(end != string::npos && s.find_first_not_of(delim, end) != string::npos)
+ {
+ ProxyParseException ex(__FILE__, __LINE__);
+ ex.str = str;
+ throw ex;
+ }
- if(!IceUtil::unescapeString(s, beg, end, adapter) || adapter.size() == 0)
+ if(!IceUtil::unescapeString(adapterstr, 0, adapterstr.size(), adapter) || adapter.size() == 0)
{
ProxyParseException ex(__FILE__, __LINE__);
ex.str = str;