Repository: trafficserver
Updated Branches:
  refs/heads/master a41b3b520 -> 60500b151


TS-1475: use strlcpy to guarantee null-termination

Coverity #1022063


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

Branch: refs/heads/master
Commit: 60500b1512f986ff62fa1c8885d5f03be43efa43
Parents: a41b3b5
Author: James Peach <[email protected]>
Authored: Mon Jul 14 15:36:30 2014 -0600
Committer: James Peach <[email protected]>
Committed: Mon Jul 14 15:37:03 2014 -0600

----------------------------------------------------------------------
 iocore/hostdb/HostDB.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/60500b15/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index ec09cf9..4e76200 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1095,7 +1095,7 @@ HostDBProcessor::setby_srv(const char *hostname, int len, 
const char *target, Ho
 
   HostDBContinuation *c = hostDBContAllocator.alloc();
   c->init(md5);
-  strncpy(c->srv_target_name, target, MAXDNAME);
+  ink_strlcpy(c->srv_target_name, target, MAXDNAME);
   c->app.allotment.application1 = app->allotment.application1;
   c->app.allotment.application2 = app->allotment.application2;
   SET_CONTINUATION_HANDLER(c,

Reply via email to