Repository: trafficserver Updated Branches: refs/heads/master 5e91acd24 -> 9dc726cb2
TS-3287: fix URL rewrite allocation size We are allocating the URL rewrite path in units of "char", not units of "char *". Coverity CID #1254805 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9dc726cb Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9dc726cb Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9dc726cb Branch: refs/heads/master Commit: 9dc726cb24808e7ee99c890c6326d501bc7be049 Parents: 5e91acd Author: James Peach <[email protected]> Authored: Wed Jan 21 13:26:18 2015 -0800 Committer: James Peach <[email protected]> Committed: Wed Jan 21 13:26:18 2015 -0800 ---------------------------------------------------------------------- proxy/http/remap/UrlRewrite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9dc726cb/proxy/http/remap/UrlRewrite.cc ---------------------------------------------------------------------- diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc index 01aa16d..5c8180e 100644 --- a/proxy/http/remap/UrlRewrite.cc +++ b/proxy/http/remap/UrlRewrite.cc @@ -312,7 +312,7 @@ url_rewrite_remap_request(const UrlMappingContainer& mapping_container, URL *req // Should be +3, little extra padding won't hurt. Use the stack allocation // for better performance (bummer that arrays of variable length is not supported // on Solaris CC. - char *newPath = static_cast<char*>(alloca(sizeof(char*)*((requestPathLen - fromPathLen) + toPathLen + 8))); + char * newPath = static_cast<char *>(alloca(sizeof(char) * ((requestPathLen - fromPathLen) + toPathLen + 8))); int newPathLen = 0; *newPath = 0;
