You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/17 23:30:51 UTC
[trafficserver] 01/03: Coverity CID #1022089 Copy into fixed size
buffer
This is an automated email from the ASF dual-hosted git repository.
sorber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 32c497574ce783172837e3f14a12ceefc0c94f57
Author: Phil Sorber <so...@apache.org>
AuthorDate: Tue May 16 14:01:19 2017 -0600
Coverity CID #1022089 Copy into fixed size buffer
---
tools/jtest/jtest.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index 61298b7..25aba34 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -3282,7 +3282,7 @@ make_url_client(const char *url, const char *base_url, bool seen, bool unthrottl
{
int iport = 80;
unsigned int ip = 0;
- char curl[512];
+ char curl[512] = {0};
char sche[8], host[512], port[10], path[512], frag[512], quer[512], para[512];
int xsche, xhost, xport, xpath, xfrag, xquer, xpar, rel, slash;
@@ -3296,7 +3296,7 @@ make_url_client(const char *url, const char *base_url, bool seen, bool unthrottl
curl[strlen(curl) - 1] = 0;
}
} else {
- strcpy(curl, url);
+ strncpy(curl, url, sizeof(curl) - 1);
}
if (!seen && seen_it(curl)) {
return -1;
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.