From 040089ea0825fa08d374d75dc9d9c66e489dae6f Mon Sep 17 00:00:00 2001 From: kientzle Date: Sat, 23 May 2009 04:31:05 +0000 Subject: [PATCH] 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. --- lib/libarchive/archive_read_support_compression_gzip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libarchive/archive_read_support_compression_gzip.c b/lib/libarchive/archive_read_support_compression_gzip.c index 14535405d148..b20c7697b14d 100644 --- a/lib/libarchive/archive_read_support_compression_gzip.c +++ b/lib/libarchive/archive_read_support_compression_gzip.c @@ -148,6 +148,7 @@ peek_at_header(struct archive_read_filter *filter, int *pbits) if (p == NULL) return (0); len += ((int)p[len + 1] << 8) | (int)p[len]; + len += 2; } /* Null-terminated optional filename. */