This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch 8.0.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit efcdc13741b2baba96a96c623effd92aa746aefa Author: Susan Hinrichs <shinr...@oath.com> AuthorDate: Tue Apr 23 16:42:31 2019 +0000 Off by 1 error in memcpy of redirect url (cherry picked from commit d611b54aadd399641e009fde77017fed4d2da01f) Conflicts: proxy/http/HttpSM.cc --- proxy/http/HttpSM.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 1008fd8..caeb2c7 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -7715,7 +7715,9 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len) // Prepend a slash and parse again. char redirect_url_leading_slash[redirect_len + 1]; redirect_url_leading_slash[0] = '/'; - memcpy(redirect_url_leading_slash + 1, redirect_url, redirect_len + 1); + if (redirect_len > 0) { + memcpy(redirect_url_leading_slash + 1, redirect_url, redirect_len); + } url_nuke_proxy_stuff(redirectUrl.m_url_impl); redirectUrl.parse(redirect_url_leading_slash, redirect_len + 1); }