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

    https://github.com/apache/trafficserver/pull/181#discussion_r26804292
  
    --- Diff: plugins/experimental/buffer_upload/buffer_upload.cc ---
    @@ -749,10 +753,22 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, 
TSEvent event, void *edata)
             }
     
             char replacement_host_str[host_hdr_str_val_len + 1];
    -        memset(replacement_host_str, 0, sizeof replacement_host_str);
             memcpy(replacement_host_str, host_hdr_str_val, 
host_hdr_str_val_len);
    +        replacement_host_str[host_hdr_str_val_len] = '\0';
             TSDebug(DEBUG_TAG, "Adding host to request url: %s", 
replacement_host_str);
     
    +        const char *colon = strchr(replacement_host_str, ':');
    +        if (colon != NULL && colon + 1 != NULL) {
    --- End diff --
    
    I think you mean `colon[1] != 0` (or, in Bryan's lingo, `'\0\'`). Because 
if `colon` is not `NULL` then `colon+1` is not going to be either.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to