summaryrefslogtreecommitdiff
path: root/usr.bin/gzip
AgeCommit message (Collapse)Author
2023-06-10Pull git commit way-etc-20140221.tar.bz2 by Xin Li from FreeBSD:simonb
Remove unneeded checks for prelen. In order to determine the type of a compressed file, we have to read in the first four bytes which may also be important for decompression purposes, to do that we would pass the buffer that we have already read in, along with the size of it. Rename header1 to fourbytes to make that explicit, and remove all checks for prelen.
2022-01-22make siginfo handler print to /dev/tty.christos
2021-09-10usr.bin: remove unnecessary lint comment CONSTCONDrillig
Since 2021-01-31, lint no longer warns about 'do ... while (0)'. No functional change.
2021-06-24Call check_siginfo() in compression loop to provide SIGINFO compressionsimonb
progress. Suggested by mrg@.
2018-11-11use the data size in case stdout was a pipe (M. Levinson)christos
2018-10-29fix typo.christos
2018-10-27handle stdin with header partially read.christos
2018-10-27remove debugging.christos
2018-10-27Fix printf conversion of off_t for 32 bit hosts (fix i386 build)kre
(%td is for ptrdiff_t)
2018-10-27Fix previousskrll
2018-10-26Add lzip support to gzip based on the example lzip decoder.christos
2018-10-06Add -l support for xz filesmartin
2018-06-12Correct Undefined Behavior in gzip(1)kamil
Unportable left shift reported with MKSANITIZER=yes USE_SANITIZER=undefined: # progress -zf ./games.tgz tar -xp -C "./" -f - /public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of 251 by 24 places cannot be represented in type 'int' 100% |****************************************************************************************************************| 44500 KiB 119.69 MiB/s 00:00 ETA Refactor the following code into something that is more clear and fix signed integer shift, by casting all buf[] elements to (unsigned int): unsigned char buf[8]; uint32_t usize; [...] else { usize = buf[4] | buf[5] << 8 | buf[6] << 16 | buf[7] << 24; [...] New version: usize = buf[4]; usize |= (unsigned int)buf[5] << 8; usize |= (unsigned int)buf[6] << 16; usize |= (unsigned int)buf[7] << 24; Only the "<< 24" part needs explicit cast, but for consistency make the integer promotion explicit and clear to a code reader. Sponsored by <The NetBSD Foundation>
2017-10-22Add gunzip and zcat to the NAME section as wellabhinav
2017-08-23now that we are processing SIGINFO write can be interrupted and returnchristos
partial results (well, it could before too but it was harder to trigger); provide write_fully like we have read_fully already.
2017-08-04add SIGINFO support.mrg
2017-06-03update copyright strings.mrg
2017-01-08Document --keep. From Timo Buhrmester <fstd.lkml@gmail.com> on netbsd-docs.wiz
Use more macros while here.
2016-01-29remove clauses 3, 4christos
2015-10-27port across the change from freebsd rev 290024:mrg
In gunzip(1), treat trailing garbage as a warning and not an error. This allows scripts to distinguish it between real fatal errors, for instance a CRC mismatch. Update manual page for the behavior change. PR: bin/203873 Submitted by: Eugene Grosbein <eugen grosbein net> MFC after: 2 weeks
2015-07-06zgrep(1): suppress the prefixing of filename on output when onlynakayama
one file is specified to match the grep(1)'s output.
2015-04-15Coverity CID 1264915, Via FreeBSD (Xin Li)christos
When reading in the original file name from gzip header, we read in PATH_MAX + 1 bytes from the file. In r281500, strrchr() is used to strip possible path portion of the file name to mitigate a possible attack. Unfortunately, strrchr() expects a buffer that is NUL-terminated, and since we are processing potentially untrusted data, we can not assert that be always true. Solve this by reading in one less byte (now PATH_MAX) and explicitly terminate the buffer after the read size with NUL.
2015-04-06Document xz decompression support better. From Joachim Henke on netbsd-docs.wiz
2015-01-13do not use directory paths present in gzip files with the -N flag,mrg
similar to the problem reported in pigz.
2014-10-18src is too big these days to tolerate superfluous apostrophes. It'ssnj
"its", people!
2014-03-18Merge riastradh-drm2 to HEAD.riastradh
2013-12-06fix == compatibility problempettai
2013-11-13Add zfgrep that fell off from last updatepettai
2013-11-12Added zless(1) - comes in the lastest version of zmore(1) from OpenBSDpettai
(OKed by tron@)
2013-07-25fferentiate zegrep and zfgrep by their basename only, so they can bepgoyette
invoked with a pathname (ie, /usr/bin/z{e,f}grep). OK wiz@
2013-07-20Use Mt for email addresses.wiz
2011-09-30add copyrightchristos
2011-08-30Use __printflike and __dead.joerg
2011-08-17fix non-literal format stringschristos
2011-08-17add noreturn atttribute.christos
2011-08-16Do proper input validation without penalizing performance.joerg
2011-08-16set errno on overflow return.christos
2011-08-16provisional fix for CVS-2011-2895, buffer overflow when uncompressingchristos
2011-06-21Add a few explicit casts for sign mismatches.joerg
2011-06-20remove most of the remaining HAVE_GCC tests that are always true inmrg
the modern world.
2011-06-19cross reference xz.1christos
2011-06-19make this work:christos
- forgot to account for prelen in the input length - deal with EOF properly
2011-06-19recognize .xz suffixchristos
2011-06-19- remove unused callchristos
- read headers separately - print error id.
2011-06-19XZ_SUPPORT requires maybe_errx().tsutsui
2011-06-19Add lzma (.xz) support. Somehow this does not decode after the first read yet.christos
2011-03-23Fix OPT_LIST. -t is not available in SMALL case.tsutsui
2010-11-06pull across a few changes from the freebsd folks:mrg
http://svn.freebsd.org/changeset/base/213044 - fixes gunzip issues http://svn.freebsd.org/changeset/base/213927 - fixes various typos and comments and also an older change to add support for bzip2's "-k" option: don't delete the input file thanks!
2010-04-14Consistently use -- for all programs called. Drop some redundant flagsjoerg
for the no file argument case.
2010-04-14Sort SEE ALSO, fix an xref.wiz