Home | History | Annotate | only in /src/usr.bin/compress
History log of /src/usr.bin/compress
RevisionDateAuthorComments
 1.12 28-May-2007  tls Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.11 08-Oct-1998  wsanchez Init style to quiet compiler.
Allow zcat hard link to compress rather than using zcat.sh wrapper; same as uncompress.
Don't install zcat, however; gzcat seems to be living in /usr/bin/zcat at the moment.
 1.10 08-Nov-1997  lukem remove WARNS?=1
 1.9 15-Sep-1997  lukem branches: 1.9.2;
* cleanup for WARNS=1
* deprecate register
* rindex -> strrchr
* fix .Nm usage
 1.8 24-Mar-1997  christos - Makefile cleanups
 1.7 18-Oct-1996  thorpej Use ${INSTALL}.
 1.6 26-Mar-1995  glass new rcsid format. what is the format for shell scripts
 1.5 17-Oct-1994  cgd don't install zcat (as it's now done by gzip), and excise the zcat sections
from the man page. add a xref to zcat(1). delete nothing, so that
people who want to avoid zcat can.
 1.4 13-Jun-1994  cgd branches: 1.4.2;
clean up import, add rcsid's.
 1.3 23-Oct-1993  jtc Both compress and gzip installed themselves as "zcat". I've changed the
makefiles so only gzip is installed as zcat (and now uncompress) because
gzip is faster than compress and it is able to detect corrupted files.
 1.2 31-Jul-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 13-Jun-1994  cgd new compress from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.4.2.1 17-Oct-1994  cgd from trunk.
 1.9.2.1 08-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.16 04-Jul-2017  wiz Add EXIT STATUS section. Use Ex. New sentence, new line.
 1.15 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.13 23-Jan-2003  wiz And finally, bump date (for -d description).
 1.12 23-Jan-2003  jdolecek also add -d to SYNOPSIS
 1.11 23-Jan-2003  grant Add description of -d.

From Soren Jacobsen in PR bin/20005.
 1.10 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 01-Dec-2001  wiz Whitespace cleanup.
 1.8 24-Mar-1999  mycroft Remove spurious .ne's.
 1.7 22-Mar-1999  garbled More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.6 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* rindex -> strrchr
* fix .Nm usage
 1.5 26-Mar-1995  glass new rcsid format. what is the format for shell scripts
 1.4 17-Oct-1994  cgd don't install zcat (as it's now done by gzip), and excise the zcat sections
from the man page. add a xref to zcat(1). delete nothing, so that
people who want to avoid zcat can.
 1.3 13-Jun-1994  cgd branches: 1.3.2;
clean up import, add rcsid's.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 13-Jun-1994  cgd new compress from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.3.2.1 17-Oct-1994  cgd from trunk.
 1.29 22-May-2022  rillig uncompress: if the source is broken, don't delete the target

Fixes the second half of PR bin/19722, reported by Giorgos Keramidas.
 1.28 22-May-2022  rillig uncompress: if the source doesn't exist, don't touch the target

Fixes part of PR bin/19722, reported by Giorgos Keramidas.
 1.27 22-May-2022  rillig compress: normalize indentation and spacing

No binary change.
 1.26 30-Aug-2011  joerg Use __printflike and __dead
 1.25 11-Apr-2009  lukem Fix -Wcast-qual and -Wsign-compare issues
 1.24 21-Jul-2008  lukem branches: 1.24.6;
Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.23 09-Apr-2006  christos branches: 1.23.22;
Coverity CID 2536: Clarify the error path further.
 1.22 05-Apr-2006  dsl Rework the way that files are closed and unlinked on error.
In particular avoid calling fclose() again once it has failed.
Also multply 'oreg' by 2 once we modify the file - so we know when to
unlink it on error.
Fixes Coverty CIDs 2535 and 2536
 1.21 09-Jul-2004  wiz Sync usage with man page. From Kouichirou Hiratsuka in PR 26197.
 1.20 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.19 26-May-2002  wiz __STDC__ is always defined on NetBSD. ANSIfy while I'm here.
 1.18 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.17 08-Oct-1998  wsanchez branches: 1.17.2; 1.17.10;
Init style to quiet compiler.
Allow zcat hard link to compress rather than using zcat.sh wrapper; same as uncompress.
Don't install zcat, however; gzcat seems to be living in /usr/bin/zcat at the moment.
 1.16 10-Mar-1998  kleink Attempt to restore a file's flags using chflags() only if the original file
ad any flags set (that is, st_flags is non-zero); this avoids a warning when
(un-)compressing a file on a file-system that does not support flags. Fixes
PR bin/4981.
 1.15 19-Oct-1997  mycroft Use double, not float.
 1.14 18-Oct-1997  lukem getopt returns -1 not EOF
 1.13 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* rindex -> strrchr
* fix .Nm usage
 1.12 16-Jan-1997  mikel stdin and stdout are not regular files; fixes PR bin/3112
skip size checks, unlinking, &c. as specified by manpage if output is
not a regular file
replace manifest constant with BUFSIZ
 1.11 20-Aug-1996  abrown Add missing braces to for-loop to make compress work again after changes
between versions 1.9 and 1.10 (dumped core when not used as a filter).
 1.10 30-Jun-1996  mrg fix lossage caused by compress' usage of /dev/stdout and /dev/stdin
combined with the (broken?) versions of these files provided with
the fdesc mount. fixes PR#774 & PR#957.
 1.9 26-Mar-1995  glass branches: 1.9.6;
new rcsid format. what is the format for shell scripts
 1.8 24-Dec-1994  cgd add zopen declaration.
 1.7 06-Oct-1994  mycroft branches: 1.7.2;
Fix RCS id format.
 1.6 13-Jun-1994  cgd clean up import, add rcsid's.
 1.5 01-Aug-1993  mycroft Add RCS identifiers.
 1.4 24-Jun-1993  mycroft Whose inane idea was it to copy this list?
BTW, we need a `-r' option.
 1.3 23-Jun-1993  mycroft Fix fencepost error.
 1.2 25-May-1993  deraadt patch00144 by Julian Stacey <stacey@guug.de>: compress.c had a
path[100] instead of path[MAXPATHLEN]
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 13-Jun-1994  cgd new compress from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.7.2.2 06-Oct-1994  mycroft Fix RCS id format.
 1.7.2.1 06-Oct-1994  mycroft file compress.c was added on branch netbsd-1-0 on 1994-10-06 16:43:18 +0000
 1.9.6.2 26-Jan-1997  rat Pullup 1.9 -> 1.10.
Fix lossage caused by compress' usage of /dev/stdout and /dev/stdin
combined with the (broken?) versions of these files provided with
the fdesc mount. fixes PR#774 & PR#957.

[ Oops. Applied patchlevel backwards. ]
 1.9.6.1 26-Jan-1997  rat Pullup 1.10 -> 1.11.
Add missing braces to for-loop to make compress work again after changes
between versions 1.9 and 1.10 (dumped core when not used as a filter).
 1.17.10.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.17.2.1 19-Oct-2000  he Pull up revision 1.18 (requested by he):
Format string cleanup.
 1.23.22.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.5 08-Oct-1998  wsanchez Init style to quiet compiler.
Allow zcat hard link to compress rather than using zcat.sh wrapper; same as uncompress.
Don't install zcat, however; gzcat seems to be living in /usr/bin/zcat at the moment.
 1.4 26-Mar-1995  glass rcsid
 1.3 26-Mar-1995  glass new rcsid format. what is the format for shell scripts
 1.2 13-Jun-1994  cgd clean up import, add rcsid's.
 1.1 13-Jun-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-Jun-1994  cgd new compress from Lite
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.3 26-Mar-1995  glass new rcsid format. what is the format for shell scripts
 1.2 13-Jun-1994  cgd clean up import, add rcsid's.
 1.1 13-Jun-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-Jun-1994  cgd new compress from Lite
 1.16 23-Mar-2022  andvar fix few typos in comments, mainly s/paramenters/parameters/.
 1.15 16-Aug-2011  joerg Do proper input validation without penalizing performance.
 1.14 16-Aug-2011  christos provisional fix for CVE-2011-2895, buffer overflow in decompression
 1.13 11-Apr-2009  lukem Fix -Wcast-qual and -Wsign-compare issues
 1.12 21-Feb-2008  joerg branches: 1.12.10; 1.12.12; 1.12.14; 1.12.18;
Fix logic error: memset arguments needs the whole size.
XXX nuke macro logic and just use sizeof.
 1.11 20-Feb-2008  joerg Remove an unused assignment and convert the remaining for (; cond; )
into while.
 1.10 20-Feb-2008  joerg Shrink by using "SysV" or ANSI C memset to init hash table.
 1.9 07-Feb-2007  hubertf branches: 1.9.4;
Remove unused ctype.h header.
Contributed by Slava Semushin <slava.semushin@gmail.com> in private mail.
 1.8 07-Aug-2003  agc branches: 1.8.18; 1.8.22;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.7 26-May-2002  wiz ANSIfy.
 1.6 15-Sep-1997  lukem * cleanup for WARNS=1
* deprecate register
* rindex -> strrchr
* fix .Nm usage
 1.5 26-Mar-1995  glass new rcsid format. what is the format for shell scripts
 1.4 06-Oct-1994  mycroft branches: 1.4.2;
Fix RCS id format.
 1.3 19-Sep-1994  andrew Don't ignore compress -b information.
 1.2 13-Jun-1994  cgd clean up import, add rcsid's.
 1.1 13-Jun-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 13-Jun-1994  cgd new compress from Lite
 1.4.2.2 06-Oct-1994  mycroft Fix RCS id format.
 1.4.2.1 06-Oct-1994  mycroft file zopen.c was added on branch netbsd-1-0 on 1994-10-06 16:43:20 +0000
 1.8.22.1 19-Aug-2011  riz Pull up following revision(s) (requested by joerg in ticket #1433):
usr.bin/compress/zopen.c: revision 1.14-1.15
xfree/xc/lib/font/fontfile/decompress.c: revision 1.2
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2
usr.bin/gzip/zuncompress.c: revision 1.9-1.11

Fix CVS-2011-2895, buffer overflow in decompress
provisional fix for CVS-2011-2895, buffer overflow when uncompressing
provisional fix for CVE-2011-2895, buffer overflow in decompression
set errno on overflow return.
Do proper input validation without penalizing performance.
Do proper input validation. Allow decompressing all input streams.
Increase robustness of LZW decoding to avoid buffer overflow on
arbitrary manipulated input streams in combination with uninitalised
memory.
Increase strictness of LZW parser.
 1.8.18.1 19-Aug-2011  riz Pull up following revision(s) (requested by joerg in ticket #1433):
usr.bin/compress/zopen.c: revision 1.14-1.15
xfree/xc/lib/font/fontfile/decompress.c: revision 1.2
xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2
usr.bin/gzip/zuncompress.c: revision 1.9-1.11

Fix CVS-2011-2895, buffer overflow in decompress
provisional fix for CVS-2011-2895, buffer overflow when uncompressing
provisional fix for CVE-2011-2895, buffer overflow in decompression
set errno on overflow return.
Do proper input validation without penalizing performance.
Do proper input validation. Allow decompressing all input streams.
Increase robustness of LZW decoding to avoid buffer overflow on
arbitrary manipulated input streams in combination with uninitalised
memory.
Increase strictness of LZW parser.
 1.9.4.1 23-Mar-2008  matt sync with HEAD
 1.12.18.1 19-Aug-2011  riz Pull up following revision(s) (requested by joerg in ticket #1661):
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.2
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.3
src/usr.bin/gzip/zuncompress.c: revision 1.9-1.11
src/usr.bin/compress/zopen.c: revision 1.14-1.15
xsrc/xfree/xc/lib/font/fontfile/decompress.c: revision 1.2
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2
xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.4
P
Fix CVS-2011-2895, buffer overflow in decompress
provisional fix for CVS-2011-2895, buffer overflow when uncompressing
provisional fix for CVE-2011-2895, buffer overflow in decompression
set errno on overflow return.
Do proper input validation without penalizing performance.
Do proper input validation. Allow decompressing all input streams.
Increase robustness of LZW decoding to avoid buffer overflow on
arbitrary manipulated input streams in combination with uninitalised
memory.
Increase strictness of LZW parser.
 1.12.14.1 19-Aug-2011  riz Pull up following revision(s) (requested by joerg in ticket #1661):
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.2
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.3
src/usr.bin/gzip/zuncompress.c: revision 1.9-1.11
src/usr.bin/compress/zopen.c: revision 1.14-1.15
xsrc/xfree/xc/lib/font/fontfile/decompress.c: revision 1.2
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2
xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.4
P
Fix CVS-2011-2895, buffer overflow in decompress
provisional fix for CVS-2011-2895, buffer overflow when uncompressing
provisional fix for CVE-2011-2895, buffer overflow in decompression
set errno on overflow return.
Do proper input validation without penalizing performance.
Do proper input validation. Allow decompressing all input streams.
Increase robustness of LZW decoding to avoid buffer overflow on
arbitrary manipulated input streams in combination with uninitalised
memory.
Increase strictness of LZW parser.
 1.12.12.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.12.10.1 19-Aug-2011  riz Pull up following revision(s) (requested by joerg in ticket #1661):
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.2
xsrc/external/mit/libXfont/dist/src/fontfile/decompress.c: revision 1.3
src/usr.bin/gzip/zuncompress.c: revision 1.9-1.11
src/usr.bin/compress/zopen.c: revision 1.14-1.15
xsrc/xfree/xc/lib/font/fontfile/decompress.c: revision 1.2
xsrc/xfree/xc/extras/freetype2/src/lzw/zopen.c: revision 1.2
xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.4
P
Fix CVS-2011-2895, buffer overflow in decompress
provisional fix for CVS-2011-2895, buffer overflow when uncompressing
provisional fix for CVE-2011-2895, buffer overflow in decompression
set errno on overflow return.
Do proper input validation without penalizing performance.
Do proper input validation. Allow decompressing all input streams.
Increase robustness of LZW decoding to avoid buffer overflow on
arbitrary manipulated input streams in combination with uninitalised
memory.
Increase strictness of LZW parser.
 1.3 02-Sep-2024  andvar s/compess/compress/
 1.2 13-Mar-2000  soren branches: 1.2.116;
Fix doubled 'the's.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.2.116.1 02-Aug-2025  perseant Sync with HEAD
 1.2 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 13-Jun-1994  cgd branches: 1.1.1.2.130;
new compress from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.1.1.2.130.1 02-Aug-2025  perseant Sync with HEAD
 1.2 13-Jun-1994  cgd clean up import, add rcsid's.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources

RSS XML Feed