summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-01-01 02:29:57 +0000
committerkientzle <kientzle@FreeBSD.org>2009-01-01 02:29:57 +0000
commit7afd406b93e728b109176d5d52deaa37ce41b933 (patch)
tree6839271dec472be8b95375e3fd0c36c2878c8a4b
parentb3e5e62b89b5aaa393ce9895dc25552e19fb0254 (diff)
downloadFreeBSD-src-7afd406b93e728b109176d5d52deaa37ce41b933.zip
FreeBSD-src-7afd406b93e728b109176d5d52deaa37ce41b933.tar.gz
Don't try to read the next Gzip header after we reach the
end of the compressed stream. This is desirable behavior, but the implementation here is very broken and causes strange problems, so disable it for now. Thanks to Simon L. Nielsen for reporting this problem.
-rw-r--r--lib/libarchive/archive_read_support_compression_gzip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libarchive/archive_read_support_compression_gzip.c b/lib/libarchive/archive_read_support_compression_gzip.c
index 1e8f818..4669ea4 100644
--- a/lib/libarchive/archive_read_support_compression_gzip.c
+++ b/lib/libarchive/archive_read_support_compression_gzip.c
@@ -428,8 +428,9 @@ gzip_source_read(struct archive_read_source *self, const void **p)
"Failed to clean up gzip decompressor");
return (ARCHIVE_FATAL);
}
- /* Restart header parser with the next block. */
- state->header_state = state->header_done = 0;
+ /* zlib has been torn down */
+ state->header_done = 0;
+ state->eof = 1;
/* FALL THROUGH */
case Z_OK: /* Decompressor made some progress. */
/* If we filled our buffer, update stats and return. */
OpenPOWER on IntegriCloud