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 2016/04/27 21:38:15 UTC

[trafficserver] 01/02: TS-4329 Off-by-one error in NULL terminator for aname in hostdb

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

zwoop pushed a commit to branch 6.1.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit a435c51a08c29bb356816882b232519504779b58
Author: Thomas Jackson <ja...@apache.org>
AuthorDate: Wed Apr 6 21:06:20 2016 -0700

    TS-4329 Off-by-one error in NULL terminator for aname in hostdb
    
    This closes #555
    
    (cherry picked from commit 0926cf698fe804dd83bcf44fbe594a164d3aaf1f)
---
 iocore/hostdb/HostDB.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index eb5b541..5b4cabf 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -1370,7 +1370,6 @@ HostDBContinuation::lookup_done(IpAddr const &ip, char const *aname, bool around
     void *host_dest = hostDB.alloc(&i->hostname_offset, s_size);
     if (host_dest) {
       ink_strlcpy((char *)host_dest, aname, s_size);
-      *((char *)host_dest + s_size) = '\0';
     } else {
       Warning("Out of room in hostdb for hostname (data area full!)");
       hostDB.delete_block(i);

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.