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/18 16:29:06 UTC
[trafficserver] branch master updated: Coverity CID #1022090 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
The following commit(s) were added to refs/heads/master by this push:
new 861ccbd Coverity CID #1022090 Copy into fixed size buffer
861ccbd is described below
commit 861ccbd0eed8a1ef82a1bb619999ff63885c9e2e
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 18 09:50:13 2017 -0600
Coverity CID #1022090 Copy into fixed size buffer
---
tools/jtest/jtest.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index f9a4ba0..7b2c88c 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -2093,10 +2093,10 @@ static void
extract_urls(char *buf, int buflen, char *base_url)
{
// if (verbose) printf("EXTRACT<<%s\n>>", buf);
- char *start = nullptr;
- char *end = nullptr;
- char old_base[512];
- strcpy(old_base, base_url);
+ char *start = nullptr;
+ char *end = nullptr;
+ char old_base[512] = {0};
+ strncpy(old_base, base_url, sizeof(old_base) - 1);
start = strncasestr(buf, "<base ", buflen);
if (start) {
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].