You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/11/05 23:55:40 UTC

[trafficserver] branch 8.0.x updated (f95273d -> 66c0112)

This is an automated email from the ASF dual-hosted git repository.

bcall pushed a change to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from f95273d  Updated Changelog
     new f6ae00e  gcc9: fixed issue with always printing a null char*
     new 9c6706c  gcc9: sprintf and strncat fixes in plugins
     new 66c0112  Updated Changelog

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG-8.0.6            | 2 ++
 example/thread_pool/psi.c  | 4 ++--
 plugins/s3_auth/s3_auth.cc | 4 ++--
 proxy/http/HttpSM.cc       | 2 +-
 4 files changed, 7 insertions(+), 5 deletions(-)


[trafficserver] 03/03: Updated Changelog

Posted by bc...@apache.org.
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 66c0112cbf907f3ea2158b91a5106df8594d4bc3
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Nov 5 15:55:23 2019 -0800

    Updated Changelog
---
 CHANGELOG-8.0.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG-8.0.6 b/CHANGELOG-8.0.6
index 990f2ec..19906f2 100644
--- a/CHANGELOG-8.0.6
+++ b/CHANGELOG-8.0.6
@@ -14,6 +14,8 @@ Changes with Apache Traffic Server 8.0.6
   #5433 - gcc9 - Fix Errata.h, NumericType.h.
   #5434 - gcc9 - Fix I_Store.h
   #5435 - gcc9 - fix HTTPVersion.
+  #5462 - gcc9: fixed issue with always printing a null char*
+  #5497 - gcc9: sprintf and strncat fixes in plugins
   #5516 - Make code compilable with BoringSSL
   #5823 - Avoid AWS auth v4 path/query param double encoding
   #5833 - Fix H2 internal counters


[trafficserver] 02/03: gcc9: sprintf and strncat fixes in plugins

Posted by bc...@apache.org.
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 9c6706c73245718d83fdf1a951c945e96c11d9ce
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue May 14 10:25:22 2019 -0700

    gcc9: sprintf and strncat fixes in plugins
    
    (cherry picked from commit fcebeae51454d45c608b1a105b8df8cca70cbbe9)
---
 example/thread_pool/psi.c  | 4 ++--
 plugins/s3_auth/s3_auth.cc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/example/thread_pool/psi.c b/example/thread_pool/psi.c
index fa465b2..e770960 100644
--- a/example/thread_pool/psi.c
+++ b/example/thread_pool/psi.c
@@ -466,7 +466,7 @@ psi_include(TSCont contp, void *edata ATS_UNUSED)
   /* For security reason, we do not allow to include files that are
      not in the directory <plugin_path>/include.
      Also include file cannot contain any path. */
-  sprintf(inc_file, "%s/%s", psi_directory, _basename(data->psi_filename));
+  snprintf(inc_file, sizeof(inc_file), "%s/%s", psi_directory, _basename(data->psi_filename));
 
   /* Read the include file and copy content into iobuffer */
   if ((filep = TSfopen(inc_file, "r")) != NULL) {
@@ -971,7 +971,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   }
 
   /* Initialize the psi directory = <plugin_path>/include */
-  sprintf(psi_directory, "%s/%s", TSPluginDirGet(), PSI_PATH);
+  snprintf(psi_directory, sizeof(psi_directory), "%s/%s", TSPluginDirGet(), PSI_PATH);
 
   /* create an TSTextLogObject to log any psi include */
   retval = TSTextLogObjectCreate("psi", TS_LOG_MODE_ADD_TIMESTAMP, &log);
diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc
index 1d95405..6814859 100644
--- a/plugins/s3_auth/s3_auth.cc
+++ b/plugins/s3_auth/s3_auth.cc
@@ -620,10 +620,10 @@ S3Request::set_header(const char *header, int header_len, const char *val, int v
 static size_t
 str_concat(char *dst, size_t dst_len, const char *src, size_t src_len)
 {
-  size_t to_copy = (src_len < dst_len) ? src_len : dst_len;
+  size_t to_copy = std::min(dst_len, src_len);
 
   if (to_copy > 0) {
-    (void)strncat(dst, src, to_copy);
+    strncat(dst, src, to_copy);
   }
 
   return to_copy;


[trafficserver] 01/03: gcc9: fixed issue with always printing a null char*

Posted by bc...@apache.org.
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 f6ae00e175c70900ac90495268c342e48e23911d
Author: Bryan Call <bc...@apache.org>
AuthorDate: Thu May 9 15:42:30 2019 -0700

    gcc9: fixed issue with always printing a null char*
    
    (cherry picked from commit 8fcc1ca57997dc19573c777a1395dd3f8a524b98)
---
 proxy/http/HttpSM.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index caeb2c7..fe05658 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -7788,7 +7788,7 @@ HttpSM::redirect_request(const char *redirect_url, const int redirect_len)
 
       if (redirectScheme == nullptr) {
         clientUrl.scheme_set(scheme_str, scheme_len);
-        SMDebug("http_redirect", "[HttpSM::redirect_request] URL without scheme %.*s", redirectSchemeLen, redirectScheme);
+        SMDebug("http_redirect", "[HttpSM::redirect_request] URL without scheme");
       }
 
       if (noPortInHost) {