The NetBSD Project

CVS log for src/usr.bin/gzip/zuncompress.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / gzip

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.6.16.1 / (download) - annotate - [select for diffs], Fri Aug 19 22:30:34 2011 UTC (2 years, 8 months ago) by riz
Branch: netbsd-4-0
Changes since 1.6: +20 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.6.6.1 / (download) - annotate - [select for diffs], Fri Aug 19 22:28:30 2011 UTC (2 years, 8 months ago) by riz
Branch: netbsd-4
Changes since 1.6: +20 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.6.36.1 / (download) - annotate - [select for diffs], Fri Aug 19 20:58:33 2011 UTC (2 years, 8 months ago) by riz
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE
Changes since 1.6: +20 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.6.32.1 / (download) - annotate - [select for diffs], Fri Aug 19 20:57:00 2011 UTC (2 years, 8 months ago) by riz
Branch: netbsd-5-0
Changes since 1.6: +20 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.6.28.1 / (download) - annotate - [select for diffs], Fri Aug 19 20:54:24 2011 UTC (2 years, 8 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Changes since 1.6: +20 -13 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

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.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Aug 16 13:55:02 2011 UTC (2 years, 8 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver, HEAD
Changes since 1.10: +20 -17 lines
Diff to previous 1.10 (colored)

Do proper input validation without penalizing performance.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Aug 16 03:25:34 2011 UTC (2 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

set errno on overflow return.

Revision 1.9 / (download) - annotate - [select for diffs], Tue Aug 16 03:21:47 2011 UTC (2 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

provisional fix for CVS-2011-2895, buffer overflow when uncompressing

Revision 1.8 / (download) - annotate - [select for diffs], Sat Nov 6 21:42:32 2010 UTC (3 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

pull across a few changes from the freebsd folks:

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!

Revision 1.6.30.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:52 2009 UTC (4 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.7 / (download) - annotate - [select for diffs], Sun Apr 12 10:31:14 2009 UTC (5 years ago) by lukem
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

fix sign-compare issues

Revision 1.2.2.2.2.2 / (download) - annotate - [select for diffs], Wed Dec 14 04:07:02 2005 UTC (8 years, 4 months ago) by jmc
Branch: netbsd-2
Changes since 1.2.2.2.2.1: +2 -2 lines
Diff to previous 1.2.2.2.2.1 (colored) to branchpoint 1.2.2.2 (colored) next main 1.3 (colored)

Pullup rev 1.6 (requested by mrg in ticket #10172)

	Fix a few issues:
gzip -vt just prints the contents of a .Z file
gzip -vt will print OK even if the .gz file is corrupt
gzip -vt prints nothing with a .bz2 file
gzip can loop endlessly with a corrupt .bz2 file
Don't warn about >4GB files not having their size correctly stored.
PR#32105 PR#32070

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Sun Nov 27 23:05:42 2005 UTC (8 years, 4 months ago) by riz
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) next main 1.6 (colored)

Pull up following revision(s) (requested by mrg in ticket #1009):
	usr.bin/gzip/unbzip2.c: revision 1.9
	usr.bin/gzip/gzip.c: revision 1.78
	usr.bin/gzip/zuncompress.c: revision 1.6
apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file

Revision 1.6 / (download) - annotate - [select for diffs], Tue Nov 22 09:05:30 2005 UTC (8 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, mjf-devfs2-base, mjf-devfs2, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: netbsd-5-1, netbsd-5-0, netbsd-5, netbsd-4-0, netbsd-4, jym-xensuspend
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

apply a patch from onno van der linden in PR#32070 that fixes
these problems:
	1) gzip -vt just prints the contents of a .Z file
	2) gzip -vt will print OK even if the .gz file is corrupt
	3) gzip -vt prints nothing with a .bz2 file
	4) gzip can loop endlessly with a corrupt .bz2 file

Revision 1.2.2.2.2.1 / (download) - annotate - [select for diffs], Sun Jul 24 21:21:17 2005 UTC (8 years, 9 months ago) by tron
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.2.2.2: +21 -7 lines
Diff to previous 1.2.2.2 (colored)

Apply patch (requested by riz in ticket #1111):
Synchronize gzip(1) with NetBSD-current.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Aug 30 14:36:51 2004 UTC (9 years, 7 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Branch point for: netbsd-3
Changes since 1.4: +21 -7 lines
Diff to previous 1.4 (colored)

Redo suffix handling so that gunzip xxx.tgx => xxx.tar
Rework logic of gz_{un}compress to make it much less likely to leak fds
    (at least 2 non-error paths leaked them!)
Make -S ".xyz" and -S "" both do something sensible.
Make in-situ compression work - only lose the file on error.
Pass an open fd to zopen (renamed zdopen) to avoid fd leakage (was badly borked)
Write header into first 64k output block to writes are aligned.
    (more efficient and might avoid some problem with code that doesn't
    like receiving partial buffers)
Check file size on compression - double checks against fs full.
Remove some pointless casts, and otherwise simplify some logic.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Sun May 30 14:48:27 2004 UTC (9 years, 10 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.2.2.1: +2 -2 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Pull up revision 1.4 (requested by mrg in ticket #420):
- fix "gzip -t" to not output anything by default.  PR#25507
- fix any decompression on corrupted gzip files.  PR#25508
- ask to overwrite files if we have a tty, rather than failing the
  operation.  PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
  errors.  maybe_warn() is for processing errors.  this allows
  "gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
  is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
  failure, not 0.  this allows for 0-sized files to be decompressed
  correctly.

Revision 1.4 / (download) - annotate - [select for diffs], Tue May 25 04:34:40 2004 UTC (9 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

- fix "gzip -t" to not output anything by default.  PR#25507
- fix any decompression on corrupted gzip files.  PR#25508
- ask to overwrite files if we have a tty, rather than failing the
  operation.  PR#25509.
- clean up maybe_err()/maybe_warn(): use maybe_err() only for fatal
  errors.  maybe_warn() is for processing errors.  this allows
  "gzip -d file1.gz file2.gz" to decompress file2.gz even if file1.gz
  is corrupted, etc.
- change the internal compressor/decompressor API to return "-1" on
  failure, not 0.  this allows for 0-sized files to be decompressed
  correctly.

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Thu Apr 29 04:48:44 2004 UTC (9 years, 11 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.2: +36 -9 lines
Diff to previous 1.2 (colored)

Pullup rev 1.3 (requested by mrg in ticket #223)

Mega patch fixes several issues & bugs in gzip:
- stdin bz2/compress support
- gzip -v pipe support
- various robustness issues
- no more .Sh BUGS in gzip.1

Revision 1.3 / (download) - annotate - [select for diffs], Sun Apr 25 16:20:33 2004 UTC (10 years ago) by mrg
Branch: MAIN
Changes since 1.2: +36 -9 lines
Diff to previous 1.2 (colored)

significantly rototill.  don't use the high-level gzio functions
anymore, use the low-level inflate()/deflate() directly.  this
allows support file-type detection on stdin; now can decompress
.Z and .bz2 files fed to stdin (fixes PR#25192) additionally it
makes -v work with stdin or stdout (fixes PR#25215.)

(with these changes, we no longer need gzopenfull(3) in libz.)

thanks to martin@ for the code gzip.c:gz_uncompress() is based on.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Feb 18 18:29:07 2004 UTC (10 years, 2 months ago) by he
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Fix mismatched type error in fropen() usage by converting return
type of zread() from ssize_t to int.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Feb 18 08:19:48 2004 UTC (10 years, 2 months ago) by mrg
Branch: MAIN

support decompressing "compress"ed files.  from rtr@ with a few minor edits
from me.  code in zuncompress liberally borrowed from usr.bin/compress.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>