svn commit: r192623 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Sat May 23 04:31:06 UTC 2009


Author: kientzle
Date: Sat May 23 04:31:05 2009
New Revision: 192623
URL: http://svn.freebsd.org/changeset/base/192623

Log:
  Include the 2 byte length field for the optional "extra data"
  field when computing the length of the gzip header.
  
  Thanks to Dag-Erling for pointing me to the OpenSSH tarballs,
  which are the first files I've seen that actually used this field.

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	Sat May 23 03:35:29 2009	(r192622)
+++ head/lib/libarchive/archive_read_support_compression_gzip.c	Sat May 23 04:31:05 2009	(r192623)
@@ -148,6 +148,7 @@ peek_at_header(struct archive_read_filte
 		if (p == NULL)
 			return (0);
 		len += ((int)p[len + 1] << 8) | (int)p[len];
+		len += 2;
 	}
 
 	/* Null-terminated optional filename. */


More information about the svn-src-all mailing list