You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by oknet <gi...@git.apache.org> on 2016/09/01 06:57:34 UTC

[GitHub] trafficserver pull request #721: TS-4470: ASAN stack-buffer-overflow when sl...

Github user oknet commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/721#discussion_r77122696
  
    --- Diff: proxy/http/HttpSM.cc ---
    @@ -6890,7 +6890,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);
    +    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
    --- End diff --
    
    The int HTTPHdr::url_print(char *buff, int length, int *offset, int *skip) only called here, can we define the output buffer ( buff ) is a '\0' terminated string?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---