You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/05/29 14:32:28 UTC

[trafficserver] branch 8.0.x updated: Switch to a safer snprintf(), makes compilers more happy

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

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


The following commit(s) were added to refs/heads/8.0.x by this push:
     new 57e20fd  Switch to a safer snprintf(), makes compilers more happy
57e20fd is described below

commit 57e20fd9b8753e6f6e6d50c3d4062b5629f54b4f
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Sun May 27 09:10:16 2018 -0600

    Switch to a safer snprintf(), makes compilers more happy
    
    (cherry picked from commit c4a1e913e2d75abcb5a3566a8e1fbc0831265797)
---
 plugins/experimental/mysql_remap/lib/iniparser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/experimental/mysql_remap/lib/iniparser.c b/plugins/experimental/mysql_remap/lib/iniparser.c
index bb9b3e7..a06b6d0 100644
--- a/plugins/experimental/mysql_remap/lib/iniparser.c
+++ b/plugins/experimental/mysql_remap/lib/iniparser.c
@@ -646,7 +646,7 @@ iniparser_load(const char *ininame)
       break;
 
     case LINE_VALUE:
-      sprintf(tmp, "%s:%s", section, key);
+      snprintf(tmp, sizeof(tmp), "%s:%s", section, key);
       errs = dictionary_set(dict, tmp, val);
       break;
 

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.