head 1.4; access; symbols pkgsrc-2022Q1:1.3.0.72 pkgsrc-2022Q1-base:1.3 pkgsrc-2021Q4:1.3.0.70 pkgsrc-2021Q4-base:1.3 pkgsrc-2021Q3:1.3.0.68 pkgsrc-2021Q3-base:1.3 pkgsrc-2021Q2:1.3.0.66 pkgsrc-2021Q2-base:1.3 pkgsrc-2021Q1:1.3.0.64 pkgsrc-2021Q1-base:1.3 pkgsrc-2020Q4:1.3.0.62 pkgsrc-2020Q4-base:1.3 pkgsrc-2020Q3:1.3.0.60 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.56 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.36 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.58 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.54 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.52 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.50 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.48 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.46 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.44 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.42 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.40 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.38 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.34 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.32 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.30 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.28 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.26 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.24 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.22 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.20 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.18 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.16 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.3.0.14 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.12 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.3.0.10 pkgsrc-2014Q2-base:1.3 pkgsrc-2014Q1:1.3.0.8 pkgsrc-2014Q1-base:1.3 pkgsrc-2013Q4:1.3.0.6 pkgsrc-2013Q4-base:1.3 pkgsrc-2013Q3:1.3.0.4 pkgsrc-2013Q3-base:1.3 pkgsrc-2013Q2:1.3.0.2 pkgsrc-2013Q2-base:1.3 pkgsrc-2013Q1:1.1.0.48 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.46 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.44 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.42 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.40 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.38 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.36 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.34 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.32 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.30 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.28 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.26 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.24 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.22 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.20 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.18 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.16 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.14 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.12 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.10 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.8 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.6 pkgsrc-2008Q1:1.1.0.4 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.2 pkgsrc-2007Q4-base:1.1; locks; strict; comment @# @; 1.4 date 2022.04.08.06.24.00; author wiz; state dead; branches; next 1.3; commitid 5E000bOUpeGavmzD; 1.3 date 2013.06.11.08.28.30; author adam; state Exp; branches; next 1.2; commitid sQcrqN4Kx7zYMaTw; 1.2 date 2013.06.09.16.55.08; author ryoon; state Exp; branches; next 1.1; commitid 0HSPYQ1ISDFREXSw; 1.1 date 2007.11.08.19.26.53; author joerg; state Exp; branches; next ; desc @@ 1.4 log @gzip: update to 1.12. * Noteworthy changes in release 1.12 (2022-04-07) [stable] ** Changes in behavior 'gzip -l' no longer misreports file lengths 4 GiB and larger. Previously, 'gzip -l' output the 32-bit value stored in the gzip header even though that is the uncompressed length modulo 2**32. Now, 'gzip -l' calculates the uncompressed length by decompressing the data and counting the resulting bytes. Although this can take much more time, nowadays the correctness pros seem to outweigh the performance cons. 'zless' is no longer installed on platforms lacking 'less'. ** Bug fixes zgrep applied to a crafted file name with two or more newlines can no longer overwrite an arbitrary, attacker-selected file. [bug introduced in gzip-1.3.10] zgrep now names input file on error instead of mislabeling it as "(standard input)", if grep supports the GNU -H and --label options. 'zdiff -C 5' no longer misbehaves by treating '5' as a file name. [bug present since the beginning] Configure-time options like --program-prefix now work. * Noteworthy changes in release 1.11 (2021-09-03) [stable] ** Performance improvements IBM Z platforms now support hardware-accelerated deflation. @ text @$NetBSD: patch-ab,v 1.3 2013/06/11 08:28:30 adam Exp $ --- unpack.c.orig 2013-02-02 04:39:13.000000000 +0000 +++ unpack.c @@@@ -21,7 +21,6 @@@@ #include "tailor.h" #include "gzip.h" -#define MIN(a,b) ((a) <= (b) ? (a) : (b)) /* The arguments must not have side effects. */ #define MAX_BITLEN 25 @@@@ -157,7 +156,7 @@@@ local void read_tree() /* Remember where the literals of this length start in literal[] : */ lit_base[len] = base; /* And read the literals: */ - for (n = leaves[len]; n > 0; n--) { + for (n = leaves[len]; n > 0 && base < LITERALS; n--) { literal[base++] = read_byte (); } } @@@@ -193,7 +192,7 @@@@ local void build_tree() prefixp = &prefix_len[1< prefix_len) *--prefixp = (uch)len; } /* The length of all other codes is unknown: */ while (prefixp > prefix_len) *--prefixp = 0; @ 1.3 log @Changes 1.6: The "--keep" (-k) option was added to not delete input files, in line with other tools such as xz, lzip, and bzip2. A decompression issue with certain invalid data in the 'pack' format was fixed. An incorrect overwrite when compiled with optimization was fixed. zgrep's handling of multi-digit context options was fixed. zmore now acts more like 'more'. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Update to 1.5 Changelog: * Noteworthy changes in release 1.5 (2012-06-17) [stable] ** Bug fixes gzip -d now decodes and checks header CRC16 checksums as specified by the FHCRC section of Internet RFC 1952. "gzip -d -S '' precious.gz" is now rejected immediately. Before, that command would emulate "rm -i precious.gz", but with an easily- misunderstood prompt. I.e., gzip would ask if it's ok to remove the existing file, "precious.gz". If you made the mistake of saying "yes", it would remove that input file before attempting to uncompress it. gzip -cdf now properly handles input consisting of gzip'd data followed by uncompressed data. Before it would output raw compressed input, too. For example, now "(printf x|gzip; echo y)|gzip -dcf" prints "xy\n", while before it would print "xy\n". gzip -rf no longer compresses files more than once (e.g., replacing FOO with FOO.gz.gz) on file systems such as ZFS where a readdir loop that unlinks and creates files can revisit output files. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 2007/11/08 19:26:53 joerg Exp $ d3 1 a3 1 --- unpack.c.orig 2012-01-01 08:53:58.000000000 +0000 d13 1 a13 1 @@@@ -145,7 +144,7 @@@@ local void read_tree() d19 1 a19 1 literal[base++] = (uch)get_byte(); d22 1 a22 1 @@@@ -181,7 +180,7 @@@@ local void build_tree() @ 1.1 log @Update gzip to 1.3.12 and merge base and info back into gzip. This includes many security fixes, improvements for files over 4GB, portability improves, zless, etc. @ text @d1 1 a1 1 $NetBSD: patch-af,v 1.1 2006/09/23 13:52:17 adrianp Exp $ d3 1 a3 1 --- unpack.c.orig 1993-08-13 08:35:00.000000000 +0100 d5 2 a6 1 @@@@ -12,7 +12,6 @@@@ static char rcsid[] = "$Id: unpack.c,v 1 a7 1 #include "crypt.h" d13 8 a20 8 @@@@ -132,7 +131,7 @@@@ local void read_tree() /* Remember where the literals of this length start in literal[] : */ lit_base[len] = base; /* And read the literals: */ - for (n = leaves[len]; n > 0; n--) { + for (n = leaves[len]; n > 0 && base < LITERALS; n--) { literal[base++] = (uch)get_byte(); } d22 1 a22 1 @@@@ -168,7 +167,7 @@@@ local void build_tree() d25 3 a27 3 int prefixes = leaves[len] << (peek_bits-len); /* may be 0 */ - while (prefixes--) *--prefixp = (uch)len; + while (prefixes-- && prefixp > prefix_len) *--prefixp = (uch)len; @