This is an automated email from the ASF dual-hosted git repository.
bcall 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 a8fead3d2f Coverity 1497314: Uninitialized scalar variable in ESI
plugin (#10835)
a8fead3d2f is described below
commit a8fead3d2f763cef8c2a6ff9bc02b5fcf47b61d3
Author: Bryan Call <[email protected]>
AuthorDate: Mon Nov 27 12:51:44 2023 -0800
Coverity 1497314: Uninitialized scalar variable in ESI plugin (#10835)
---
plugins/esi/common/gzip.cc | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/plugins/esi/common/gzip.cc b/plugins/esi/common/gzip.cc
index 57ec5d9652..09ded8f957 100644
--- a/plugins/esi/common/gzip.cc
+++ b/plugins/esi/common/gzip.cc
@@ -140,11 +140,14 @@ EsiLib::gunzip(const char *data, int data_len, BufferList
&buf_list)
data_len -= (GZIP_HEADER_SIZE + GZIP_TRAILER_SIZE);
buf_list.clear();
z_stream zstrm;
- zstrm.zalloc = Z_NULL;
- zstrm.zfree = Z_NULL;
- zstrm.opaque = Z_NULL;
- zstrm.next_in = nullptr;
- zstrm.avail_in = 0;
+ zstrm.zalloc = Z_NULL;
+ zstrm.zfree = Z_NULL;
+ zstrm.opaque = Z_NULL;
+ zstrm.next_in = nullptr;
+ zstrm.avail_in = 0;
+ zstrm.total_in = 0;
+ zstrm.total_out = 0;
+
if (inflateInit2(&zstrm, -MAX_WBITS) != Z_OK) {
TSError("[%s] inflateInit2 failed!", __FUNCTION__);
return false;