You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2016/06/22 21:40:30 UTC

[trafficserver] 10/14: TS-4470: ASAN stack-buffer-overflow when slow log is enabled Update to use offset

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

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 8d9bfb3b5b0c6750716d2e05f6182c87045c3dec
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Jun 21 09:49:40 2016 -0700

    TS-4470: ASAN stack-buffer-overflow when slow log is enabled
    Update to use offset
    
    (cherry picked from commit 639a081ab4a8ff9306b02834a9dc5b028f23501a)
---
 proxy/http/HttpSM.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 8b0157a..8204e44 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6911,8 +6911,8 @@ HttpSM::update_stats()
     int offset = 0;
     int skip = 0;
 
-    t_state.hdr_info.client_request.url_print(url_string, sizeof(url_string), &offset, &skip);
-    url_string[sizeof(url_string) - 1] = 0; // NULL terminate the string
+    t_state.hdr_info.client_request.url_print(url_string, sizeof(url_string) - 1, &offset, &skip);
+    url_string[offset] = 0; // NULL terminate the string
 
     // unique id
     char unique_id_string[128] = "";

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.