Skip to content

Commit d605c6c

Browse files
authored
Couple of coverity fixes. (#12145)
* Fix for CID-1593545: Uninitialized scalar field * Fix for 1593544 : Unchecked return value from library
1 parent ccff845 commit d605c6c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/compress/configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class HostConfiguration : private atscppapi::noncopyable
148148
int compression_algorithms_;
149149
unsigned int minimum_content_length_;
150150

151-
RangeRequestCtrl range_request_ctl_;
151+
RangeRequestCtrl range_request_ctl_{RangeRequestCtrl::IGNORE_RANGE};
152152
StringContainer compressible_content_types_;
153153
StringContainer allows_;
154154
// maintain backwards compatibility/usability out of the box

src/iocore/net/Server.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ Server::listen(bool non_blocking, const NetProcessor::AcceptOptions &opt)
125125
}
126126

127127
if (ats_is_unix(&accept_addr)) {
128-
chmod(accept_addr.sun.sun_path, 0777);
128+
if (chmod(accept_addr.sun.sun_path, 0777) < 0) {
129+
goto Lerror;
130+
}
129131
}
130132

131133
if ((res = safe_listen(sock.get_fd(), get_listen_backlog())) < 0) {

0 commit comments

Comments
 (0)