summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zgrep: avoid exploit via multi-newline file namesLasse Collin2022-04-061-3/+7
| | | | | | | | | | | | | * zgrep.in: The issue with the old code is that with multiple newlines, the N-command will read the second line of input, then the s-commands will be skipped because it's not the end of the file yet, then a new sed cycle starts and the pattern space is printed and emptied. So only the last line or two get escaped. This patch makes sed read all lines into the pattern space and then do the escaping. This vulnerability was discovered by: cleemy desu wayo working with Trend Micro Zero Day Initiative
* gzip: fix i386 portPaul Eggert2022-04-061-4/+4
| | | | | | | * deflate.c (prev_length, match_start, max_chain_length, good_match): Make these extern instead of static, reverting part of the 2021-12-01T21:46:36Z!eggert@cs.ucla.edu patch. These symbols are used by i386 asm, and so must be extern at least for i386.
* maint: pacify GCC with recent x86 glibcPaul Eggert2022-04-061-0/+1
| | | | | | * configure.ac (WERROR_CFLAGS): Disable -Wtype-limits, due to a false alarm on platforms where 'long' is 32 bits and time_t is 64-bit, such as recent glibc on x86.
* maint: update from GnulibPaul Eggert2022-04-044-26/+47
| | | | | * bootstrap, tests/init.sh: Copy manually from current Gnulib. * lib/.gitignore, m4/.gitignore: Update as per current Gnulib.
* build: update gnulib submodule to latestPaul Eggert2022-04-041-0/+0
|
* build: support --program-prefix etc.Paul Eggert2022-04-0415-26/+73
| | | | | | | | | | | | | | | | Problem reported by Antonio Diaz Diaz via Dagobert Michelsen in: https://bugs.gnu.org/16876 * Makefile.am (.in): Substitute for 'gzip', 'zdiff', 'zgrep'. ($(GZIP_TRANSFORMED), $(ZDIFF_TRANSFORMED), $(ZGREP_TRANSFORMED)): New rules to build forwarding shell scripts, if needed. Add these files to BUILT_SOURCES and MOSTLY_CLEANFILES if needed. * configure.ac (GZIP_TRANSFORMED, ZDIFF_TRANSFORMED, ZGREP_TRANSFORMED): New substituted vars. (GZIP_IS_TRANSFORMED, ZDIFF_IS_TRANSFORMED, ZGREP_IS_TRANSFORMED): New Automake conditions. * gunzip.in, gzexe.in, zcat.in, zcmp.in, zdiff.in, zegrep.in: * zfgrep.in, zforce.in, zgrep.in, zless.in, zmore.in, znew.in: Quote possibly-transformed subcommand names.
* doc: improve doc for saved timestamps etc.Paul Eggert2022-04-012-12/+24
| | | | Problem reported by Carpe Sébastien (Bug#24559).
* tests: port list-big test to macOS 12.1Paul Eggert2022-03-311-1/+1
| | | | * tests/list-big: Use dd, not truncate, to create a big file.
* zmore: don't assume benign PAGER in testingPaul Eggert2022-03-311-1/+1
| | | | | | | * tests/help-version (zmore_setup): Unset PAGER so that we test 'more', not whatever the tester has in its PAGER environment variable. This works around a problem I found when I ran 'PAGER=less make check' on a platform that lacked 'less'.
* zless: install only on platforms with 'less'Paul Eggert2022-03-314-3/+21
| | | | | | | | | Problem reported by Michael Felt (Bug#30029). * Makefile.am (ZLESS_MAN, ZLESS_PROG): New macros. (man_MANS, bin_SCRIPTS): Use them. * configure.ac: Check for 'less'. * tests/Makefile.am (ZLESS_PROG): New macro. (built_programs): Use it.
* doc: spelling fixesPaul Eggert2022-03-293-16/+16
|
* doc: omit @refillPaul Eggert2022-03-291-1/+1
| | | | | * doc/gzip.texi: Remove @refill to suppress warning ‘gzip.texi:562: warning: @refill is obsolete.’ from makeinfo 6.8.
* zdiff: fix another arg-handling bugPaul Eggert2022-03-081-52/+75
| | | | | Also allow args after file names. Problem reported by Lv Ying <https://bugs.gnu.org/54290#12>.
* zdiff: fix arg handling bugPaul Eggert2022-03-072-1/+14
| | | | | Problem reported by Lv Ying (Bug#54291). * zdiff.in (escape): Handle args like '-C 5'.
* doc: embolden SEE ALSO refsPaul Eggert2022-02-106-6/+36
| | | | Problem reported by Helge Kreutzmann (Bug#53918).
* maint: avoid new syntax-check failuresJim Meyering2022-01-031-0/+1
| | | | | * cfg.mk (local-checks-to-skip): Add sc_indent, to skip it. Otherwise, "make syntax-check" would fail.
* build: disable some expensive compiler warnings by defaultJim Meyering2022-01-031-26/+41
| | | | | * configure.ac (gl_GCC_VERSION_IFELSE): Copy from coreutils. (gcc-warnings): Update from coreutils.
* maint: make update-copyrightJim Meyering2022-01-0365-65/+65
|
* build: update gnulib to latest; also bootstrap and init.shJim Meyering2022-01-034-112/+130
|
* doc: document gzip -l changePaul Eggert2021-12-153-29/+10
| | | | | * NEWS, doc/gzip.texi (Invoking gzip), gzip.1 (gunzip): Document recent change.
* gzip: gzip -l now outputs accurate sizePaul Eggert2021-12-158-66/+76
| | | | | | | | | | | | | | | | | | gzip -l now decompresses to see how long the uncompressed file was. This fixes what is by far the most common bug report for gzip. It has a significant performance cost, but it’s worth it nowadays. * gzip.c (main): -l now sets 'test' too. All uses of 'test' changed. (treat_stdin, treat_file): Call do_list after decompressing, so that the length is known. (do_list): Omit arg IFD, since it is no longer needed. All callers changed. Get the CRC and uncompressed size from input_crc and bytes_out instead of using lseek. * tests/list-big: New test. * unzip.c (unzip): Set unzip_crc before returning. * util.c (write_buf): If 'test', output nothing. Update bytes_out with output byte count, regardless of 'test'. All callers changed.
* maint: reduce module couplingPaul Eggert2021-12-0110-51/+26
| | | | | | | | | | | | | | | | | If a symbol is extern but never used by another module, make it static instead, or remove it if it is not used anywhere. * Makefile.am (gzip_SOURCES): Remove lzw.c. * bits.c (bi_buf, bi_valid) [!IBM_Z_DFLTCC]: * deflate.c (prev_length, match_start, max_chain_length) (good_match, lm_init): * gzip.c (verbose) [!DEBUG]: * unlzw.c (block_mode): Now static. * gzip.c (help, main, do_lzw): * revision.h: Simplify by assuming !LZW. * util.c (setcrc): Define only if IBM_Z_DFLTCC. (make_simple_name): Define only if NO_MULTIPLE_DOTS.
* maint: modernize README-{hacking,prereq}Paul Eggert2021-10-302-28/+118
|
* build: update gnulib submodule to latestPaul Eggert2021-09-071-0/+0
|
* maint: post-release administriviaJim Meyering2021-09-033-2/+5
| | | | | | * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
* version 1.11v1.11Jim Meyering2021-09-031-1/+1
| | | | * NEWS: Record release date.
* tests: port still better to NetBSDPaul Eggert2021-08-311-5/+9
| | | | * tests/hufts: Ignore more lines starting with ‘+’ in stderr.
* tests: port better to NetBSDPaul Eggert2021-08-312-4/+8
| | | | | | * tests/hufts, tests/zdiff: Ignore lines starting with ‘+’ in stderr. The NetBSD shell outputs them after set -x.
* tests: update help-version from coreutilsPaul Eggert2021-08-311-59/+61
| | | | | | | This merges coreutils/tests/misc/help-version.sh into gzip/tests/help-version; they're now identical except for the initial init.sh configuration line. This should port better to NetBSD.
* maint: update .gitignore filesPaul Eggert2021-08-313-11/+11
| | | | | * .gitignore, lib/.gitignore, m4/.gitignore: Bring up to date. Remove duplicates. Sort.
* tests: port two-files to IRIX 6.5Paul Eggert2021-08-311-0/+2
| | | | | Problem reported by Nelson H. F. Beebe. * tests/two-files: Skip test if /dev/urandom is not readable.
* build: update gnulib to latestJim Meyering2021-08-291-0/+0
|
* maint: don't send announcements to TP coordinatorJim Meyering2021-08-291-0/+4
| | | | | | gzip has no translatable strings, so don't include the translation project coordinator's email address in the announcement template. * cfg.mk (translation_project_): Define to be empty.
* gzip: clarify "other links" diagnosticPaul Eggert2021-08-191-2/+2
| | | | | | | * gzip.c (treat_file): Instead of saying "gzip: FOO has 1 other link -- unchanged", say "gzip: FOO has 1 other link -- file ignored". This is clearer when -k is also used (Bug#50097).
* build: update gnulib to latestJim Meyering2021-08-082-1/+13
|
* build: update gnulib to latestJim Meyering2021-06-304-5/+13
|
* bug#47715: [PATCH] gzip.c: use a more portable alignmentDmitry V. Levin2021-04-111-2/+2
| | | | | | | | | | | The alignment of 8192 introduced by commit be0c5581e38332b2ffa8a4cf92076cfde02872b4 is not quite portable: eu-elflint --gnu-ld complains about the result gzip executable with the following diagnostics: section [25] '.bss' not fully contained in segment of program header entry 6 * gzip.c [__alignas_is_defined] (BUFFER_ALIGNED): Decrease alignment from 8192 back to 4096.
* maint: modernize .gitignorePaul Eggert2021-03-072-25/+20
| | | | | * lib/.gitignore, m4/.gitignore: Sort and modernize to current Gnulib.
* zgrep: fix option typoPaul Eggert2021-03-071-1/+1
| | | | | * zgrep.in: Fix typo in option processing that prevented operands like ‘binary-1’.
* gzip: port to SIGPIPE-less platformsPaul Eggert2021-03-071-0/+2
| | | | * gzip.c (main): Don’t assume SIGPIPE is defined.
* * gzip.1: Quote better (Bug#46730).Paul Eggert2021-02-261-2/+2
|
* maint: update all copyright year number rangesJim Meyering2021-01-0169-71/+87
| | | | | | | Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise.
* maint: avoid another autoreconf warningJim Meyering2020-12-091-2/+3
| | | | | * configure.ac: modernize AC_TRY_COMPILE invocation Use AC_COMPILE_IFELSE instead of AC_TRY_COMPILE.
* maint: remove uses of obsolete macrosJim Meyering2020-12-091-3/+0
| | | | * configure.ac (AC_TYPE_SIGNAL, AC_ISC_POSIX, AC_HEADER_STDC): Remove.
* maint: avoid autoreconf warningsJim Meyering2020-12-091-1/+1
| | | | | | * configure.ac: Go back to using AC_PROG_CC rather than AC_PROG_CC_STDC, as the latter is obsolescent and the Autoconf bug involving the former has been fixed.
* build: update gnulib to latestJim Meyering2020-12-091-0/+0
|
* build: require autoconf-2.64Jim Meyering2020-12-091-1/+1
| | | | * configure.ac: Require autoconf-2.64, up from 2.63, to align with gnulib.
* Add a test for compressing and decompressing two filesIlya Leoshkevich2020-09-242-0/+32
| | | | | It ensures that compression and decompression state of the first file does not affect the second file.
* Fix DFLTCC segfault when compressing or decompressing two filesIlya Leoshkevich2020-09-241-6/+8
| | | | | The value in total_in global variable from processing the first file affected processing of the second file. Fix by making total_in local.
* bug#43583: Fix building DFLTCC with clangIlya Leoshkevich2020-09-241-1/+6
| | | | clang does not support .machinemode, so put it under an #ifdef.