| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* tests/write-error: Make executable. Skip the test if we're running as root.
|
|
|
|
|
|
|
|
|
|
|
| |
* gzip.c (create_outfile): Call write_error, not progerror,
so failure to open for writing gives a better diagnostic:
gzip: failed to write d/f.gz: Permission denied
rather than this:
gzip: d/f.gz: Permission denied
* tests/write-error: New file, to test for this.
* tests/Makefile.am (TESTS): Add the file name.
Reported in https://bugs.gnu.org/16876.
|
| |
|
|
|
|
|
|
|
|
| |
The idea is to defend against some adversary-in-the-middle attacks.
Also prefer git.savannah.gnu.org over its shorter alias, git.sv.gnu.org
to avoid a warning e.g., from git clone.
Also, drop any final ".git" suffix on the resulting URIs.
Inspired by Paul Eggert's nearly identical changes to coreutils.
|
|
|
|
| |
* zless.in: Use --show-preproc-error if available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix gzip to behave like cat etc. when outputting to a broken pipe:
i.e., exit with nonzero status if SIGPIPE is ignored, and be
terminated by SIGPIPE otherwise.
* NEWS: Mention this.
* gzip.c: Do not install signal handlers unless creating an output
file, for which signal handlers are needed. This avoids gzip
having to deal with signal handlers when outputting to stdout.
(exiting_signal): Remove. All uses removed.
(main): Do not install signal handlers at first.
(create_outfile): Instead, install them only when needed.
(finish_up_gzip): New function, which generalizes abort_gzip.
(abort_gzip): Use it.
* tests/pipe-output: New test.
* tests/Makefile.am (TESTS): Add it.
* util.c (EPIPE): Default to 0.
(write_error): Just warn if it is a pipe error, and suppress that
warning if quiet. In any event exit with status 2 (warning),
not status 1 (error).
* zgrep.in: Treat gzip status 141 like status 2;
it is a broken pipe either way.
|
|
|
|
| |
* doc/gzip.texi: Document exit status.
|
|
|
|
| |
* bootstrap.conf (buildreq): Remove rsync.
|
|
|
|
|
| |
* Makefile.am (gzip.doc): Generate gzip.doc in the source directory, not in the
build directory.
|
|
|
|
|
|
|
|
| |
* gunzip.in, gzexe.in, gzip.c, zcat.in, zcmp.in, zdiff.in, zforce.in,
zgrep.in, zless.in, zmore.in, znew.in: Also update the --version copyright
dates (those are not updated by update-copyright) by running this:
grep -l ' 2022 Free'|xargs perl -pi -e 's/ 2022 Free/ 2023 Free/'
|
| |
|
| |
|
|
|
|
|
| |
* cfg.mk (_gl_TS_extern): Allow a leading '_Noreturn ' on
declarations like that of abort_gzip.
|
|
|
|
| |
* inflate.c: Indent with spaces, not TABs.
|
|
|
|
|
|
|
| |
Add lines for each bug reporter and fix contributor for
which there is a Bug# in the commit messages.
Fix some accents and email addresses and sorting issues
while we’re in the neighborhood.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Use strerror, not perror.
This removes dependencies on Gnulib’s ‘threadlib’ and ‘lock’ modules,
and simplifies the mainline code. Apparently the old code was written
before strerror was universally supported; nowadays we can use Gnulib
strerror instead. All uses of perror changed to use strerror+fprintf.
* gzip.h (WARN): Since this expands to a statement, wrap within
‘do ... while (false)’ for the usual reasons. Helpful now that
calls to WARN are now simplified.
|
|
|
|
|
|
| |
* Makefile.am (gzip_LDADD): Add LIB_FDATASYNC as gnulib-tool suggests.
It’s not likely to make much difference nowadays (does anybody still
run Solaris 10 x86?) but it shouldn’t hurt to add it.
|
|
|
|
|
|
|
|
|
| |
I recently added this option to Gnulib, and it seems a better
match for gzip as it means just one bootstrap-related file.
* README-hacking: Document this.
* bootstrap: Sync from gnulib/build-aux/bootstrap, not
from gnulib/top/bootstrap.
* autogen.sh, autopull.sh, bootstrap-funclib.sh: Remove.
|
| |
|
|
|
|
|
| |
* README-hacking: Improve wording.
* autogen.sh, autopull.sh, bootstrap-funclib.sh: New files.
|
|
|
|
|
| |
They are not needed in C23, which Gnulib now emulates.
(We no longer worry about C89, since Gnulib doesn’t.)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Bruno Haible (Bug#56749).
* README-hacking: Document this.
* bootstrap: Sync from Gnulib by running
'./bootstrap ./bootstrap --bootstrap-sync’.
* bootstrap.conf: Do not mkdir build-aux, since bootstrap
does that for us.
(bootstrap_post_import_hook): Create the empty ChangeLog
in this new function.
|
|
|
|
| |
This also syncs COPYING from Gnulib and README-hacking from Coreutils.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn’t fix any bugs, since the code is correct as-is on all
C versions. However, it pacifies gcc -std=c99 -Wstrict-prototypes,
which complains about a function definition without arguments
unless there’s a previous prototype with ‘(void)’.
Most (but not all) of this patch merely reverts some recent
changes to be more consistent when porting to C23.
* dfltcc.c (is_dfltcc_enabled):
* gzip.c (get_input_size_and_time):
* inflate.c (inflate_stored, inflate_fixed, inflate_dynamic):
* unpack.c (read_byte):
|
|
|
|
|
| |
* gzip.c (BUFFER_ALIGNED): Do not depend on __alignas_is_defined
as that has been removed from C23.
|
|
|
|
|
|
|
| |
* gzip.h (local): Remove. All uses replaced by ‘static’.
Previously, the source code was inconsistent about using ‘local’
vs ‘static’ even before the recent changes, and ‘local’ was
more trouble than it was worth.
|
|
|
|
|
|
|
| |
C23 does not allow K&R style function definitions.
Use protyped definitions. However, don't bother with (void) in
function definitions since C23 prefers (); so prefer () to (void) as
this will work with older compilers anyway.
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Replace dosname with filename.
* gzip.c: Include filename.h, not dosname.h.
* lib/.gitignore: Remove name of dosname.h.
|
|
|
|
|
|
|
|
|
| |
* bootstrap.conf (gnulib_modules): Remove stdnoreturn.
* gzip.h: Do not include stdnoreturn.h.
All uses of noreturn replaced by _Noreturn,
at start of declaration for benefit of C23.
* lib/.gitignore, m4/.gitignore: Remove names of
stdnoreturn-related files.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* zgrep.in (icolon): Defend better against sed failure.
Suggested by Lasse Collin.
|
| |
|
|
|
|
| |
* bootstrap: Copy from Gnulib.
|
|
|
|
|
| |
* NEWS: Mention the bug.
* tests/unpack-invalid: Test for the bug.
|
|
|
|
|
|
|
|
|
| |
Problem reported by Young Mo Kang and fix from Mark Adler (Bug#56247).
* inflate.c: Include stdbool.h.
(fresh): New static var.
* inflate.c (flush_output): Clear it.
(inflate): Set it.
(inflate_codes): Fail if the offset is outside a fresh input window.
|
|
|
|
|
|
|
|
|
| |
This pacifies gcc -Wformat -DDEBUG.
* bits.c (send_bits):
* deflate.c (check_match):
* inflate.c (huft_build, inflate_codes):
* trees.c (send_code, gen_codes, flush_block):
Use correct printf formats for signed vs unsigned integers.
|
|
|
|
|
| |
* NEWS: Reference newly-assigned CVE number.
* cfg.mk (old_NEWS_hash)
|
|
|
|
|
|
|
|
|
|
| |
* cfg.mk (srcdirslash): New macro.
(in_vc_files): Use it to avoid problems when srcdir is '.'.
Also look for copyright dates in shell script *.in files,
so that ‘zgrep --version’ etc. outputs current dates.
* gunzip.in, gzexe.in, gzip.c, zcat.in, zcmp.in, zdiff.in:
* zforce.in, zgrep.in, zless.in, zmore.in, znew.in:
Update copyright date in --version output to 2022.
|
|
|
|
|
|
| |
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
|
|
| |
* NEWS: Record release date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem reported by Jim Avera (Bug#31280).
This became more of an issue when GNU grep 3.5 (2020) started sending
"binary file matches" diagnostics to stderr instead of to stdout.
* tests/Makefile.am (TESTS): Add zgrep-binary.
* tests/zgrep-binary: New test.
* zgrep.in (args): New var, to accumulate args separately
from grep command, so we can prepend args if need be.
Most uses of 'grep' changed to use 'args' instead, or also.
(with_filename): Set to 1 if more than one file and -h not given;
this simplifies later code.
(gnuish_grep): New var; evaluates to true if grep supports
-H and --label options, as is true for GNU and FreeBSD grep.
Append -H to 'grep' if outputting file names with GNUish grep,
and use --label with GNUish grep unless reading from stdin,
as that’s safer and more efficient than relabeling with 'sed'.
|
|
|
|
|
|
|
|
| |
* gzexe.in, zdiff.in, zgrep.in:
Run expr and sed in the C locale when it might help to avoid
undefined behavior on non-GNU platforms.
* sample/zfile, znew.in: Run in the C locale, for simplicity and
to avoid undefined behavior on non-GNU platforms.
|
|
|
|
|
|
| |
* gzexe.in: Avoid an unnecessary invocation of ‘grep’,
by using sed instead. Also, look only for at-most-3-digit numbers,
for consistency with the rest of the script.
|
| |
|
|
|
|
|
|
|
| |
* zgrep.in (res): When escaping the file name do not rely on GNU
sed’s extension to POSIX with respect to s/.../\n/. Instead, use
features that should also work with AIX and/or Solaris sed. This is
simpler anyway, and would have prevented the recently-fixed bug.
|
|
|
|
|
|
|
| |
* tests/zgrep-abuse: New file, based on PoC by cleemy desu wayo.
* tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the exploit.
The bug appears to have been present since the beginning.
|