This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 9.2.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push: new 9cadb63c59 resize string so it doesn't over flow (#10099) 9cadb63c59 is described below commit 9cadb63c590327b2903b5e3c39a6231ffab5ed49 Author: Fei Deng <f...@yahooinc.com> AuthorDate: Fri Jul 28 10:35:34 2023 -0500 resize string so it doesn't over flow (#10099) (cherry picked from commit 604436161b9a69072d9416daf22ad8c10e649b11) --- plugins/experimental/traffic_dump/sensitive_fields.h | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/experimental/traffic_dump/sensitive_fields.h b/plugins/experimental/traffic_dump/sensitive_fields.h index f69d9c7fd0..4591c96629 100644 --- a/plugins/experimental/traffic_dump/sensitive_fields.h +++ b/plugins/experimental/traffic_dump/sensitive_fields.h @@ -47,6 +47,7 @@ public: operator()(std::string_view str) const { std::string lower; + lower.resize(str.size()); std::transform(str.begin(), str.end(), lower.begin(), [](unsigned char c) -> unsigned char { return std::tolower(c); }); return std::hash<std::string>()(lower); }