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 2017/05/11 21:49:44 UTC

[trafficserver] branch master updated (bb59ae6 -> 05423d2)

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

zwoop pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.

      from  bb59ae6   coverity 1199995 : return code not checked
       new  c844211   Coverity CID #1021871 Dereference null return value
       new  7b4c6a8   Coverity CID #1021755 Uninitialized pointer field
       new  5b73044   Coverity CID #1022120 Dereference before null check
       new  05423d2   Coverity CID #1267799 Resource leak Coverity CID #1241990 Resource leak

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 iocore/cache/CacheDir.cc                            |  1 +
 iocore/dns/I_DNSProcessor.h                         | 16 ++++++++--------
 iocore/dns/SplitDNS.cc                              |  4 ++--
 plugins/experimental/ssl_cert_loader/domain-tree.cc |  5 +++--
 4 files changed, 14 insertions(+), 12 deletions(-)

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

[trafficserver] 04/04: Coverity CID #1267799 Resource leak Coverity CID #1241990 Resource leak

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 05423d2b859a2d3614e1b3c7719a0a69b0864e2c
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 11 14:38:15 2017 -0600

    Coverity CID #1267799 Resource leak
    Coverity CID #1241990 Resource leak
---
 plugins/experimental/ssl_cert_loader/domain-tree.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plugins/experimental/ssl_cert_loader/domain-tree.cc b/plugins/experimental/ssl_cert_loader/domain-tree.cc
index 47324b3..b642ed7 100644
--- a/plugins/experimental/ssl_cert_loader/domain-tree.cc
+++ b/plugins/experimental/ssl_cert_loader/domain-tree.cc
@@ -173,10 +173,11 @@ DomainNameTree::insert(std::string key, void *payload, int order)
 
       new_node->parent = node->parent;
       new_node->children.push_back(node);
+      node->parent = new_node;
 
       // Replace the node with new_node in the child list of the parent;
-      for (std::deque<DomainNameNode *>::iterator iter = node->parent->children.begin(); iter != node->parent->children.end();
-           ++iter) {
+      for (std::deque<DomainNameNode *>::iterator iter = new_node->parent->children.begin();
+           iter != new_node->parent->children.end(); ++iter) {
         if (*(iter) == node) {
           *(iter) = new_node;
         }

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

[trafficserver] 03/04: Coverity CID #1022120 Dereference before null check

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5b730441e9dc89504f5b25ff7bfdb58d4da0aa29
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 11 13:43:27 2017 -0600

    Coverity CID #1022120 Dereference before null check
---
 iocore/dns/SplitDNS.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/iocore/dns/SplitDNS.cc b/iocore/dns/SplitDNS.cc
index 9bd69f0..096bfb3 100644
--- a/iocore/dns/SplitDNS.cc
+++ b/iocore/dns/SplitDNS.cc
@@ -138,13 +138,13 @@ SplitDNSConfig::reconfigure()
   params->m_SplitDNSlEnable = gsplit_dns_enabled;
   params->m_DNSSrvrTable    = new DNS_table("proxy.config.dns.splitdns.filename", modulePrefix, &sdns_dest_tags);
 
-  params->m_numEle = params->m_DNSSrvrTable->getEntryCount();
-  if (nullptr == params->m_DNSSrvrTable || (0 == params->m_numEle)) {
+  if (nullptr == params->m_DNSSrvrTable || (0 == params->m_DNSSrvrTable->getEntryCount())) {
     Warning("No NAMEDs provided! Disabling SplitDNS");
     gsplit_dns_enabled = 0;
     delete params;
     return;
   }
+  params->m_numEle = params->m_DNSSrvrTable->getEntryCount();
 
   if (nullptr != params->m_DNSSrvrTable->getHostMatcher() && nullptr == params->m_DNSSrvrTable->getReMatcher() &&
       nullptr == params->m_DNSSrvrTable->getIPMatcher() && 4 >= params->m_numEle) {

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

[trafficserver] 01/04: Coverity CID #1021871 Dereference null return value

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c844211c2b5e529b767a3f9414b2547002b51fc0
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 11 12:41:36 2017 -0600

    Coverity CID #1021871 Dereference null return value
---
 iocore/cache/CacheDir.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index da55c57..bad2f9d 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -1355,6 +1355,7 @@ dir_corrupt_bucket(Dir *b, int s, Vol *d)
     ink_release_assert(e);
     e = next_dir(e, seg);
   }
+  ink_release_assert(e);
   dir_set_next(e, dir_to_offset(e, seg));
 }
 

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

[trafficserver] 02/04: Coverity CID #1021755 Uninitialized pointer field

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b4c6a8cd5a9de6f259f7b52812f67fec78546b8
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 11 13:27:08 2017 -0600

    Coverity CID #1021755 Uninitialized pointer field
---
 iocore/dns/I_DNSProcessor.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/iocore/dns/I_DNSProcessor.h b/iocore/dns/I_DNSProcessor.h
index 564582d..965fd1c 100644
--- a/iocore/dns/I_DNSProcessor.h
+++ b/iocore/dns/I_DNSProcessor.h
@@ -41,12 +41,12 @@
 */
 struct HostEnt : RefCountObj {
   struct hostent ent;
-  uint32_t ttl;
-  int packet_size;
-  char buf[MAX_DNS_PACKET_LEN];
-  u_char *host_aliases[DNS_MAX_ALIASES];
-  u_char *h_addr_ptrs[DNS_MAX_ADDRS + 1];
-  u_char hostbuf[DNS_HOSTBUF_SIZE];
+  uint32_t ttl                           = 0;
+  int packet_size                        = 0;
+  char buf[MAX_DNS_PACKET_LEN]           = {0};
+  u_char *host_aliases[DNS_MAX_ALIASES]  = {nullptr};
+  u_char *h_addr_ptrs[DNS_MAX_ADDRS + 1] = {nullptr};
+  u_char hostbuf[DNS_HOSTBUF_SIZE]       = {0};
 
   SRVHosts srv_hosts;
 
@@ -54,8 +54,8 @@ struct HostEnt : RefCountObj {
 
   HostEnt()
   {
-    size_t base = sizeof(force_VFPT_to_top); // preserve VFPT
-    memset(((char *)this) + base, 0, sizeof(*this) - base);
+    ink_zero(ent);
+    ink_zero(srv_hosts);
   }
 };
 

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