You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "ezelkow1 (via GitHub)" <gi...@apache.org> on 2025/01/21 20:31:47 UTC

[PR] Don't assume LogAccess::m_client_req_unmapped_url_canon_str is null t… [trafficserver]

ezelkow1 opened a new pull request, #11976:
URL: https://github.com/apache/trafficserver/pull/11976

   …erminated. (#936) (#11305)
   
   In this code:
   
   https://github.com/apache/trafficserver/blob/ff100f4f5ce69a00e3f3093f202d5f1aa9bb2ee5/src/proxy/logging/LogAccess.cc#L1591
   
   if the unmapped URL has nothing to escape, m_client_req_unmapped_url_canon_str will retain the value returned by string_get_ref().
   
   string_get_ref() is a wrapper for url_string_get_ref():
   
   https://github.com/apache/trafficserver/blob/ff100f4f5ce69a00e3f3093f202d5f1aa9bb2ee5/include/proxy/hdrs/URL.h#L468
   
   In this case, there is no apparent null termination:
   
   https://github.com/apache/trafficserver/blob/ff100f4f5ce69a00e3f3093f202d5f1aa9bb2ee5/src/proxy/hdrs/URL.cc#L631
   
   It looks like this is how the terminal null can be lost on m_ptr_printed_string:
   
   https://github.com/apache/trafficserver/blob/ff100f4f5ce69a00e3f3093f202d5f1aa9bb2ee5/src/proxy/hdrs/URL.cc#L360 https://github.com/apache/trafficserver/blob/e0620eb941eab2603b2c230366e0fae5eeb6b57d/include/proxy/hdrs/HdrHeap.h#L255 (cherry picked from commit 89cdda706d991a09df1e887975888099ff041666)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Don't assume LogAccess::m_client_req_unmapped_url_canon_str is null t… [trafficserver]

Posted by "ezelkow1 (via GitHub)" <gi...@apache.org>.
ezelkow1 merged PR #11976:
URL: https://github.com/apache/trafficserver/pull/11976


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org