svn commit: r186670 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Thu Jan 1 02:29:58 UTC 2009


Author: kientzle
Date: Thu Jan  1 02:29:57 2009
New Revision: 186670
URL: http://svn.freebsd.org/changeset/base/186670

Log:
  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.

Modified:
  head/lib/libarchive/archive_read_support_compression_gzip.c

Modified: head/lib/libarchive/archive_read_support_compression_gzip.c
==============================================================================
--- head/lib/libarchive/archive_read_support_compression_gzip.c	Thu Jan  1 02:29:17 2009	(r186669)
+++ head/lib/libarchive/archive_read_support_compression_gzip.c	Thu Jan  1 02:29:57 2009	(r186670)
@@ -428,8 +428,9 @@ gzip_source_read(struct archive_read_sou
 						"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. */


More information about the svn-src-head mailing list