Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jan 2009 02:29:57 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186670 - head/lib/libarchive
Message-ID:  <200901010229.n012TvPk041728@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901010229.n012TvPk041728>