You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by su...@apache.org on 2015/04/22 19:48:51 UTC
trafficserver git commit: add a trailing zero char
Repository: trafficserver
Updated Branches:
refs/heads/master be1e01757 -> fedcb82c0
add a trailing zero char
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fedcb82c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fedcb82c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fedcb82c
Branch: refs/heads/master
Commit: fedcb82c0f7b510050f12c6df77828a43baf9817
Parents: be1e017
Author: Feifei Cai <ff...@yahoo-inc.com>
Authored: Wed Apr 22 15:46:42 2015 +0000
Committer: Feifei Cai <ff...@yahoo-inc.com>
Committed: Wed Apr 22 15:46:42 2015 +0000
----------------------------------------------------------------------
proxy/http/HttpSM.cc | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fedcb82c/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 400f733..99f3aa1 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7485,6 +7485,7 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
if (!noPortInHost) {
char port_buf[6]; // handle upto 5 digit port
buf[host_len++] = ':';
+ buf[host_len] = '\0';
host_len += ink_small_itoa(port, port_buf, sizeof(port_buf));
ink_strlcat(buf, port_buf, sizeof(buf));
@@ -7521,6 +7522,7 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
if (!noPortInHost) {
char port_buf[6]; // handle upto 5 digit port
buf[origHostPort_len++] = ':';
+ buf[origHostPort_len] = '\0';
origHostPort_len += ink_small_itoa(origPort, port_buf, sizeof(port_buf));
ink_strlcat(buf, port_buf, sizeof(buf));
}