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 2013/04/20 01:19:29 UTC

[4/6] git commit: TS-1820 Fix read_manager_string(), and make sure it uses the buffer size to ink_strlcpy().

TS-1820 Fix read_manager_string(), and make sure it uses the buffer size to
ink_strlcpy().


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c6dd66ec
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c6dd66ec
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c6dd66ec

Branch: refs/heads/master
Commit: c6dd66ec5361df70bb5e2610463ecabb1fee2c88
Parents: e343dbb
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Apr 16 22:28:34 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri Apr 19 17:05:47 2013 -0600

----------------------------------------------------------------------
 cop/TrafficCop.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c6dd66ec/cop/TrafficCop.cc
----------------------------------------------------------------------
diff --git a/cop/TrafficCop.cc b/cop/TrafficCop.cc
index 484f9ad..a595f4d 100644
--- a/cop/TrafficCop.cc
+++ b/cop/TrafficCop.cc
@@ -1056,7 +1056,7 @@ error:
 }
 
 static int
-read_manager_string(const char *variable, char *value, size_t) // UNUSED size_t val_len
+read_manager_string(const char *variable, char *value, size_t val_len)
 {
   char buffer[4096];
   char request[1024];
@@ -1104,7 +1104,7 @@ read_manager_string(const char *variable, char *value, size_t) // UNUSED size_t
     return -1;
   }
 
-  ink_strlcpy(value, p, e - p + 1);
+  ink_strlcpy(value, p, val_len);
 
   return 0;
 }