Commit Graph

55 Commits

Author SHA1 Message Date
Simon L. B. Nielsen
2948f3ea27 Correct directory traversal and race condition vulnerabilities in gzip.
Security:	FreeBSD-SA-05:11.gzip
Security:	CAN-2005-0988, CAN-2005-1228
Obtained from:	Steve Grubb via RedHat, Debian
Approved by:	nectar
2005-06-08 21:25:19 +00:00
Tim J. Robbins
d5a0b816a0 Bring in fix from gzip 1.3.3 to avoid crashes when processing certain corrupt
input files:

1999-06-25  Paul Eggert  <eggert@twinsun.com>

        * inflate.c (huft_build):
        Set n to length of v, to detect improper tables.
        Don't accidentally grow j past z.

MFC after:	3 days
2004-08-13 05:38:44 +00:00
David E. O'Brien
b38dafc010 Restore vendor Id. 2004-05-03 10:33:27 +00:00
David E. O'Brien
78b67cd1f8 Tweak to rev 1.8 to match the offical http://www.gzip.org/gzip-1.2.4b.patch 2004-05-03 10:29:23 +00:00
David E. O'Brien
774cd1faf6 Gzip assumes 'unsigned long' is 32-bits wide and depends on this.
One thing Gzip does is implicitly by store the size of a file into an
'unsigned long' rather than  explicitly compute the remainder modulo 2^32
(see RFC 1952 section 2.3.1 "ISIZE").  Thus an extracted file size is
does not equal the original size (mod 2^32) for files larger than 4GB.

This manifests itself in errors such as:
	zcat: bigfile.gz: invalid compressed data--length error

PR:		66008, 66009
Submitted by:	Peter Losher <Peter_Losher@isc.org>
Patch by:	tjr
2004-05-02 23:07:49 +00:00
Tim J. Robbins
def2bdaaa5 Apply patch from gzip web page to correctly decompress files larger than
4GB on architectures with 64-bit long integers.
2004-05-02 02:54:37 +00:00
Andrey A. Chernov
3cf745d8c9 Remove getopt*.c, we already have compatible getopt_long() in libc 2004-02-17 01:59:37 +00:00
David E. O'Brien
13e85b308a /rescue/g{{,un}zip,zcat} exist, so build this dynamically now. 2003-11-17 05:18:36 +00:00
Peter Wemm
10a498be8f The third arg to strncmp() is size_t, not int. This causes a warning on
systems where size_t is long, not int.
2003-10-26 04:10:50 +00:00
Peter Wemm
66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Alfred Perlstein
e043516d4d Check for defined(__i386__) instead of just defined(i386) since the compiler
will be updated to only define(__i386__) for ANSI cleanliness.
2002-05-30 07:00:42 +00:00
Jacques Vidrine
57813231df Use mktemp(1) when creating temporary files. 2002-01-25 15:02:01 +00:00
Ruslan Ermilov
b9ad8c8635 beforeinstall -> SCRIPTS. 2001-04-07 11:21:35 +00:00
Ruslan Ermilov
e5ac5644e2 MAN[1-9] -> MAN. 2001-03-27 14:59:06 +00:00
Kris Kennaway
7db4903d42 Use mktemp -t to respect TMPDIR
Clean up temporary file at runtime
2000-11-19 13:10:11 +00:00
Alexey Zelkin
c6d6e7726f Correct spelling : ascii -> ASCII
PR:		docs/13702
Submitted by:	Stephen J. Roznowski <sjr@home.com>
Reviewed by:	mpp
1999-09-20 09:15:23 +00:00
Peter Wemm
9b7a44a60e $Id$ -> $FreeBSD$ 1999-08-27 23:37:10 +00:00
Ruslan Ermilov
994b5741d9 Unbroke zforce.
PR:		8348
Submitted by:	Christoph Weber-Fahr <wefa@callcenter.systemhaus.net>
1999-08-11 10:34:57 +00:00
Kris Kennaway
8a9cbccd6f Fixes from OpenBSD:
Add $Id$
Removes temp file exploits in gzexe (predictable filenames)
Fixes some typos
Fixes a buffer overrun in gzip -S
Don't prepend /usr/local/bin to path in scripts
Correct location of /usr/share/misc/termcap

Obtained from:	OpenBSD
1999-05-28 13:23:27 +00:00
Bruce Evans
2512f2fe3b Fixed printf format errors. 1998-06-30 20:14:13 +00:00
Peter Wemm
aac18d035f Use cc -E rather than cpp when looking for __ELF__ 1998-03-08 17:25:10 +00:00
John Birrell
44626f8fec Make machine dependent asm code machine dependent. 8-) 1998-01-25 09:52:32 +00:00
Wolfram Schneider
6043106601 Check argument filename length before copying.
$ gzip `perl -e 'for(1..10240){ print "a"}'`
1997-12-27 03:38:39 +00:00
Wolfram Schneider
9c8ac6c742 Workaround to avoid a strange core dump.
gzip < /dev/null | perl -npe 's/\003\003/\003\225/' | gzip -d
1997-12-26 21:12:26 +00:00
Wolfram Schneider
1132c08dd8 Do not install the z*grep man pages if grep was linked with -lz. 1997-12-26 01:53:58 +00:00
Wolfram Schneider
15ec2a04f8 When called as `zgrep', the -Z argument is assumed. Make a
link from zgrep to grep.

Pointed out by: Tim Vanderhoek <hoek@hwcn.org> and
                Mike Smith <mike@smith.net.au>
1997-12-21 19:15:12 +00:00
Wolfram Schneider
00caa62588 Added zgrep.libz. This version of zgrep(1) depend on a
grep(1) linked with libz.
1997-12-20 19:20:33 +00:00
Wolfram Schneider
8873fd5457 Use getopts instead getopt(1). This should fix the problem
with whitespaces in pattern.
PR:	5211
1997-12-07 01:00:56 +00:00
Wolfram Schneider
f6b31571f6 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
Søren Schmidt
cf302734e1 Dont use an internal function called warn it clashes with libc.
Allows ELF compile.
1997-08-29 16:14:20 +00:00
Peter Wemm
839dac029a Don't accidently compress "sh" or there are unfortunate consequences.
PR: 4220
Submitted-by: Dag-Erling Coidan Smørgrav <finrod@pugwash.priv.no>
1997-08-09 15:34:40 +00:00
Paul Traina
72b4ef7179 NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
1997-06-29 06:03:42 +00:00
Wolfram Schneider
dc15037d84 Understand `--' to end processing of command options.
This means one search for a string starting with a dash.
Fix also filenames starting with a dash. Close PR #3349
1997-04-19 20:06:57 +00:00
Guido van Rooij
34eddd5161 Remove unnecessary chmod()'s. This should likely go in other branches.
Obtained from: aleph1@UNDERGROUND.ORG on Bugtraq
1997-03-15 22:43:58 +00:00
Peter Wemm
fce15c9ab3 Revert $FreeBSD$ to $Id$ 1997-02-22 15:48:31 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
e8caab9f75 Don't install zgrep twice. 1996-08-28 15:45:32 +00:00
Wolfram Schneider
5a80fb277e sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
Wolfram Schneider
bb9656377b install fast version of zgrep 1996-07-02 23:01:01 +00:00
Wolfram Schneider
63cdf05c43 faster
average 2-3 x
	for option -h or -q 10 x

handle option -q and -L

better exit status, similar to grep (0: matches found 1: no
matches found 2: error)
1996-05-12 16:20:26 +00:00
Wolfram Schneider
9fb933075e `mv'' -> `mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root
1996-05-07 23:19:49 +00:00
Mike Pritchard
bcff8e2ae4 Another round of man page cleanups.
Down to only about 100 items left to cleanup! :-)
1996-02-12 04:57:03 +00:00
Mike Pritchard
7c87ef470d Correct some manual page cross reference errors. E.g. su is a section
one man page, not section eight.  This is the first round of such changes
and only fixes man pages in manual section one.
1996-02-02 00:26:12 +00:00
Wolfram Schneider
a270abb407 Add missing manpage zgrep.1 and links zegrep.1, zfgrep.1
Add missing links zegrep and zfgrep
1996-01-23 01:00:37 +00:00
Peter Wemm
6065a0be11 This commit was generated by cvs2svn to compensate for changes in r13122,
which included commits to RCS files with non-trunk default branches.
1995-12-30 19:02:48 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Bruce Evans
9c0dc173cc Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
Rodney W. Grimes
4399be3cbd Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
Jordan K. Hubbard
2ded984659 Make gzip static by default. This is needed because it's such a
frequent companion to tar.
1994-06-15 19:16:58 +00:00
Nate Williams
87601b6e8d Updated gzip from version 1.2.2 to 1.2.4 due to popular demand 1993-10-14 00:33:38 +00:00