Repository: trafficserver Updated Branches: refs/heads/master 45e16703f -> a435e7882
TS-1411: Seg fault when using %<cquuc> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a435e788 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a435e788 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a435e788 Branch: refs/heads/master Commit: a435e788234315f94016a3f490a09773e781d9fb Parents: 45e1670 Author: Sean Cosgrave <[email protected]> Authored: Tue May 20 16:25:48 2014 -0700 Committer: Bryan Call <[email protected]> Committed: Tue May 20 16:26:30 2014 -0700 ---------------------------------------------------------------------- proxy/logging/LogAccessHttp.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a435e788/proxy/logging/LogAccessHttp.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc index d8250ab..4b8d39c 100644 --- a/proxy/logging/LogAccessHttp.cc +++ b/proxy/logging/LogAccessHttp.cc @@ -91,7 +91,13 @@ LogAccessHttp::init() if (hdr->client_request.valid()) { m_client_request = &(hdr->client_request); - m_client_req_url_str = m_client_request->url_string_get_ref(&m_client_req_url_len); + + // make a copy of the incoming url into the arena + const char *url_string_ref = m_client_request->url_string_get_ref(&m_client_req_url_len); + m_client_req_url_str = m_arena.str_alloc(m_client_req_url_len + 1); + memcpy(m_client_req_url_str, url_string_ref, m_client_req_url_len); + m_client_req_url_str[m_client_req_url_len] = '\0'; + m_client_req_url_canon_str = LogUtils::escapify_url(&m_arena, m_client_req_url_str, m_client_req_url_len, &m_client_req_url_canon_len); m_client_req_url_path_str = m_client_request->path_get(&m_client_req_url_path_len);
