gzip interprets an argument of "-" as indicating stdin, but when
"-" is not the first name on the command line, it doesn't work.
* gzip.c (treat_stdin): Initialize "ifd".
Patch and fine description by Lasse Collin in
http://www.mail-archive.com/bug-gzip@gnu.org/msg00213.html
* Makefile.am (check-local): Exercise the fix. Based on the above.
* NEWS (Bug fixes): Mention this.
done
./gzip -dc $(srcdir)/tests/hufts-segv.gz > /dev/null 2>&1; \
test $$? = 1
+ k=in-$$$$; printf a | ./gzip > $$k && \
+ test "`cat $$k | ./gzip -dc $$k - $$k`" = aaa && rm $$k
@echo 'Test succeeded.'
install-exec-hook: remove-installed-links
** Bug fixes
+ gzip -d no longer fails with "-" as 2nd or subsequent argument
+
gzip no longer ignores a close-induced write failure, e.g., on NFS
gzip -d no longer segfaults on certain invalid inputs
clear_bufs(); /* clear input and output buffers */
to_stdout = 1;
part_nb = 0;
+ ifd = fileno(stdin);
if (decompress) {
method = get_method(ifd);