diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2010-02-15 15:14:36 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2010-02-15 15:14:36 -0330 |
commit | 61170318ee3bb8c084400a93e85cd8f1e18592ae (patch) | |
tree | 722215f86adbb3ee99c6b2c65f8ae37528b1e5f1 /cpp/src/Slice/Util.cpp | |
parent | 4664 - readString, readBlob in Java & C# don't check the size before allocati... (diff) | |
download | ice-61170318ee3bb8c084400a93e85cd8f1e18592ae.tar.bz2 ice-61170318ee3bb8c084400a93e85cd8f1e18592ae.tar.xz ice-61170318ee3bb8c084400a93e85cd8f1e18592ae.zip |
Bug 4665 - slice2java segfault
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r-- | cpp/src/Slice/Util.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 187c56457bd..365d8555f43 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -293,8 +293,14 @@ Slice::filterMcppWarnings(const string& message) static const string separators = "\n\t "; vector<string> in; + string::size_type start = 0; + string::size_type end; + while((end = message.find('\n', start)) != string::npos) + { + in.push_back(message.substr(start, end - start)); + start = end + 1; + } vector<string> out; - IceUtilInternal::splitString(message, "\n", in); bool skipped; for(vector<string>::const_iterator i = in.begin(); i != in.end(); i++) { |