This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new fb41acc0c8 money_trace cid 1518569: string not null terminated (#10373)
fb41acc0c8 is described below

commit fb41acc0c8a3014fe4145787d278a7b9c158f9a5
Author: Brian Olsen <brian_ols...@comcast.com>
AuthorDate: Wed Sep 6 06:18:18 2023 -0600

    money_trace cid 1518569: string not null terminated (#10373)
---
 plugins/experimental/money_trace/money_trace.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/experimental/money_trace/money_trace.cc 
b/plugins/experimental/money_trace/money_trace.cc
index 7c0aa4e27a..785fc7d3e8 100644
--- a/plugins/experimental/money_trace/money_trace.cc
+++ b/plugins/experimental/money_trace/money_trace.cc
@@ -209,7 +209,7 @@ next_trace(std::string_view const request_hdr, TSHttpTxn 
const txnp)
   bwriter.write(spanid);
   bwriter.print("{}", TSHttpTxnIdGet(txnp));
 
-  nexttrace.assign(bwriter.view());
+  nexttrace = std::string(bwriter.data(), bwriter.size());
 
   return nexttrace;
 }
@@ -237,7 +237,7 @@ create_trace(TSHttpTxn const txnp)
         bwriter.write(spanid);
         bwriter.print("{}", TSHttpTxnIdGet(txnp));
 
-        header = std::string{bwriter.view()};
+        header = std::string(bwriter.data(), bwriter.size());
       } else {
         LOG_ERROR("Error getting uuid string");
       }

Reply via email to