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

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


The following commit(s) were added to refs/heads/master by this push:
     new d605c6c82a Couple of coverity fixes. (#12145)
d605c6c82a is described below

commit d605c6c82a58f391975e7b17569defba743448b0
Author: Damian Meden <[email protected]>
AuthorDate: Tue Apr 1 11:53:08 2025 +0200

    Couple of coverity fixes. (#12145)
    
    * Fix for CID-1593545: Uninitialized scalar field
    
    * Fix for 1593544 : Unchecked return value from library
---
 plugins/compress/configuration.h | 2 +-
 src/iocore/net/Server.cc         | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/plugins/compress/configuration.h b/plugins/compress/configuration.h
index cc348a12d5..f710375a13 100644
--- a/plugins/compress/configuration.h
+++ b/plugins/compress/configuration.h
@@ -148,7 +148,7 @@ private:
   int          compression_algorithms_;
   unsigned int minimum_content_length_;
 
-  RangeRequestCtrl range_request_ctl_;
+  RangeRequestCtrl range_request_ctl_{RangeRequestCtrl::IGNORE_RANGE};
   StringContainer  compressible_content_types_;
   StringContainer  allows_;
   // maintain backwards compatibility/usability out of the box
diff --git a/src/iocore/net/Server.cc b/src/iocore/net/Server.cc
index ddc922f80e..6f5f569ce8 100644
--- a/src/iocore/net/Server.cc
+++ b/src/iocore/net/Server.cc
@@ -125,7 +125,9 @@ Server::listen(bool non_blocking, const 
NetProcessor::AcceptOptions &opt)
   }
 
   if (ats_is_unix(&accept_addr)) {
-    chmod(accept_addr.sun.sun_path, 0777);
+    if (chmod(accept_addr.sun.sun_path, 0777) < 0) {
+      goto Lerror;
+    }
   }
 
   if ((res = safe_listen(sock.get_fd(), get_listen_backlog())) < 0) {

Reply via email to