trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject trafficserver git commit: This buffer is memset to null, and we leave room for the last \0.
Date Fri, 09 Jan 2015 15:10:55 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 11537217c -> a60d6db62


This buffer is memset to null, and we leave room for the last \0.

Coverity CID #1022091


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

Branch: refs/heads/master
Commit: a60d6db627ec2ba4dee7bbc4db904a4a5bbdaf82
Parents: 1153721
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Fri Jan 9 08:10:05 2015 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Fri Jan 9 08:10:05 2015 -0700

----------------------------------------------------------------------
 tools/jtest/jtest.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a60d6db6/tools/jtest/jtest.cc
----------------------------------------------------------------------
diff --git a/tools/jtest/jtest.cc b/tools/jtest/jtest.cc
index 0e52e1c..172b52b 100644
--- a/tools/jtest/jtest.cc
+++ b/tools/jtest/jtest.cc
@@ -1931,11 +1931,11 @@ static int read_response(int sock) {
       int l = HEADER_SIZE - fd[sock].req_pos - 1;
       if (l <= 0) {
         if (verbose || verbose_errors)
+          // coverity[string_null_argument]
           printf("header too long '%s'", fd[sock].req_header);
         return read_response_error(sock);
       }
-      err = read(sock, fd[sock].req_header + fd[sock].req_pos,
-                 HEADER_SIZE - fd[sock].req_pos - 1);
+      err = read(sock, fd[sock].req_header + fd[sock].req_pos, HEADER_SIZE - fd[sock].req_pos
- 1);
     } while ((err == -1) && (errno == EINTR));
     if (err <= 0) {
       if (!err) {


Mime
View raw message