You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by br...@apache.org on 2014/07/14 23:45:37 UTC

git commit: TS-1475: Fix bug where local buffer might still be referenced. Coverity #1200047

Repository: trafficserver
Updated Branches:
  refs/heads/master c10e7473e -> 4833e8344


TS-1475: Fix bug where local buffer might still be referenced. Coverity #1200047


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

Branch: refs/heads/master
Commit: 4833e8344fe875212218c6b7fd99ceff3a771d6a
Parents: c10e747
Author: Brian Geffon <br...@apache.org>
Authored: Mon Jul 14 14:45:29 2014 -0700
Committer: Brian Geffon <br...@apache.org>
Committed: Mon Jul 14 14:45:29 2014 -0700

----------------------------------------------------------------------
 lib/atscppapi/src/GzipInflateTransformation.cc | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4833e834/lib/atscppapi/src/GzipInflateTransformation.cc
----------------------------------------------------------------------
diff --git a/lib/atscppapi/src/GzipInflateTransformation.cc b/lib/atscppapi/src/GzipInflateTransformation.cc
index 9561bfc..936a472 100644
--- a/lib/atscppapi/src/GzipInflateTransformation.cc
+++ b/lib/atscppapi/src/GzipInflateTransformation.cc
@@ -111,6 +111,7 @@ void GzipInflateTransformation::consume(const string &data) {
 
     if (err != Z_OK && err != Z_STREAM_END) {
      LOG_ERROR("Iteration %d: Inflate failed with error '%d'", iteration, err);
+     state_->z_stream_.next_out = NULL;
      return;
     }
 
@@ -118,6 +119,7 @@ void GzipInflateTransformation::consume(const string &data) {
     produce(string(&buffer[0], (inflate_block_size - state_->z_stream_.avail_out)));
     state_->bytes_produced_ += (inflate_block_size - state_->z_stream_.avail_out);
   }
+  state_->z_stream_.next_out = NULL;
 }
 
 void GzipInflateTransformation::handleInputComplete() {