diff options
| author | Charles E. Rolke <chug@apache.org> | 2012-05-07 13:44:11 +0000 |
|---|---|---|
| committer | Charles E. Rolke <chug@apache.org> | 2012-05-07 13:44:11 +0000 |
| commit | 736b4a8d91342544079ed6b67266e9cc9f64fb76 (patch) | |
| tree | d675bdef684cf00333e05bc0a4b2ce857ac1beb8 /qpid/cpp/src | |
| parent | ade0c939b4b3c2d9d1c2be57e4fb75888da6152f (diff) | |
| download | qpid-python-736b4a8d91342544079ed6b67266e9cc9f64fb76.tar.gz | |
NO-JIRA Fix calculation of buffer size.
Buffers that have hex chars may have hundreds of them.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1335016 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/log/Statement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/log/Statement.cpp b/qpid/cpp/src/qpid/log/Statement.cpp index 79f7a28100..09d1c9449f 100644 --- a/qpid/cpp/src/qpid/log/Statement.cpp +++ b/qpid/cpp/src/qpid/log/Statement.cpp @@ -36,7 +36,7 @@ std::string quote(const std::string& str) { size_t n = std::count_if(str.begin(), str.end(), nonPrint); if (n==0) return str; std::string ret; - ret.reserve(str.size()+2*n); // Avoid extra allocations. + ret.reserve(str.size()+3*n); // Avoid extra allocations. for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) { if (nonPrint(*i)) { ret.push_back('\\'); |
