source:
scripts/untested/blfs-patches/ncompress_4.2.4-15.patch@
0f496c0
Last change on this file since 0f496c0 was 16fbfc51, checked in by , 19 years ago | |
---|---|
|
|
File size: 19.8 KB |
-
debian/README.debian
Submitted By: Ryan Oliver <ryan.oliver@pha.com.au> Date: 2005-06-08 Initial Package Version: 4.2.4 Upstream Status: Unknown Origin: Debian http://ftp.debian.org/debian/pool/main/n/ncompress/ncompress_4.2.4-15.diff.gz Description: Add bounds checking to fix buffer overflow
old new 1 General Notes 2 ------------- 3 4 In this package, 'uncompress' is installed as 'uncompress.real' to avoid 5 conflict with the gzip package. Most of the utility scripts distributed with 6 the source code (zdiff, zmore, zcmp) are not installed. 7 8 The uncompress.real program installed to /usr/bin is just a symlink to the 9 compress program. Same goes for the uncompress.real manpage in 10 /usr/share/man/man1. 11 12 Please note that this version of ncompress does not support files larger than 13 2GB. I have toyed with increasing this limit, but I haven't been overly 14 successful. It looks to be possible to increase the limit up to 4GB, but 15 that's still an arbitrary limit, and given my level of understanding of this 16 code, I'm leery of doing it for no real gain. If you need support for very 17 large files, I suggest using gzip rather than compress. 18 19 Also, note that prior to fixing bug #220820 (in November of 2003, version 20 4.2.4-13), there was a data-corruption bug with 'compress -b9'. If you created 21 files using -b9 (maxbits of 9) prior to this version, your file was probably 22 corrupted, and you will only be able to recover parts of it. I have "fixed" 23 this bug by disallowing maxbits less than 10. The uncompress.real program will 24 still decompress 9-bit files created by other compress programs (such as the 25 ones from Solaris or AIX) but the compress program will not create 9-bit files. 26 27 This package was moved to main in August of 2004. Prior to that, it was kept 28 out of main because it implements the patented LZW algorithm. The consensus is 29 that patents on that algorithm have expired as of July 2004. 30 31 32 Upstream Source Code 33 -------------------- 34 35 Christoph apparently downloaded the original tarball from: 36 37 ftp://sunsite.unc.edu/pub/linux/utils/compress/ncompress-4.2.4.tar.Z 38 39 In the meantime, however, sunsite.unc.edu has disappeared, and has been 40 replaced by ibiblio.org, so the current URL is: 41 42 ftp://ftp.ibiblio.org/pub/linux/utils/compress/ncompress-4.2.4.tar.Z 43 44 This probably doesn't matter much at all, since there hasn't been a new 45 "upstream" release in more than 10 years. In any case, the contents of the 46 packgae orig.tar.gz file match exactly with the contents of the file currently 47 on ibiblio.org. 48 49 50 Copyright and Patent Discussion 51 ------------------------------- 52 53 The following article is from James A. Woods, one of the earlier authors of 54 compress. The article discusses the Unisys patent on the LZW compression 55 method, and how that affects ncompress. 56 57 From uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!wuarchive!usc!ucsd!ucbvax!agate!riacs!jaw Wed Aug 1 15:06:59 EDT 1990 58 Article: 1282 of gnu.misc.discuss 59 Path: alembic!uunet!zephyr.ens.tek.com!uw-beaver!mit-eddie!wuarchive!usc!ucsd!ucbvax!agate!riacs!jaw 60 From: jaw@riacs.edu (James A. Woods) 61 Newsgroups: gnu.misc.discuss 62 Subject: Sperry patent #4,558,302 does *not* affect 'compress' 63 Keywords: data compression, algorithm, patent 64 Message-ID: <1990Jul31.220935.1424@riacs.edu> 65 Date: 31 Jul 90 22:09:35 GMT 66 Organization: RIACS, NASA Ames Research Center 67 Lines: 69 68 69 # "The chief defect of Henry King 70 Was chewing little bits of string." 71 72 -- Hilaire Belloc, Cautionary Tales [1907] 73 74 As a co-author of 'compress' who has had contact with an attorney for 75 Unisys (nee Sperry), I would like to relay a very basic admission from Unisys 76 that noncommercial use of 'compress' is perfectly legal. 'Compress' is also 77 commercially distributed by AT&T as part of Unix System 5 release 4, 78 with no further restrictions placed upon the use of the binary, as far 79 as I am aware. 80 81 From conversations with Professor Abraham Lempel and others, it 82 appears that neither AT&T, Sun Microsystems, Hewlett Packard, nor IBM 83 are paying any sort of license fees to Unisys in conjunction with patent 84 #4,558,302. It may be true that some organizations are paying fees for 85 data compression technology licensed from one or more of the many holders 86 of compression patents, but this is all independent from 'compress'. 87 88 In particular, I received a letter at NASA dated October 1, 1987 from 89 John B. Sowell of the Unisys law department, informing me for the first 90 time that some form of LZW was patented. I naturally expressed 91 skepticism that an algorithm could be patented (a murky legal area 92 which remains so), stated that 'compress' is not identical to LZW, 93 and in fact was designed, developed, and distributed before the ink 94 on the patent was dry. Several telephone conversations later, Mr. Sowell 95 intimated that they would *not* seek any fees from users of 'compress' 96 but instead were signing licensees for hardware implementations of LZW. 97 98 So, regardless of what you believe about a shady legal area, if anyone 99 from Unisys contacts you to extract tribute for the use of 'compress', please 100 tell them that, first, it is not theirs to begin with, and, second, there is 101 someone who will testify in court about the conversation above. 102 It is not even clear if anyone can "own" 'compress', since original developer 103 Spencer Thomas, myself, and others placed the code in the public domain 104 long before the adoption of the Berne copyright convention. 105 106 In light of the events above, it seems that the Free Software 107 Foundation is being unduly paranoid about the use of 'compress'. 108 Now I can well believe that FSF is more likely to be a legal target 109 than a behemoth like AT&T, but if they are simply redistributing 110 untouched free software developed years ago in the public sector, 111 I see no problem. 112 113 Aside: I am investigating, possibly for a case history to be 114 recycled to USENET, the particulars of data compression patents. 115 I am aware of the following patents: IBM's Miller-Wegman LZ variant, 116 those of Telcor and ACT [losing candidates for the British Telecom modem 117 standard], James A. Storer's work on limited lookahead as explicated in his 118 text "Data Compression (methods and theory)", Computer Science Press, 1988, 119 and the various patents pending associated with the Fiala and Greene 120 CACM article of April, 1989 on textual substitution methods. 121 If you have any lore, send it this way. 122 123 124 125 Sincerely, 126 127 James A. Woods 128 NASA Ames Research Center (RIACS) 129 jaw@riacs.edu (or ames!jaw) 130 131 132 P.S. The algorithm patent issue certainly is a "topic A" at the moment. 133 One useful reference is the review article by Anthony and Colwell -- 134 "Litigating the Validity and Infringement of Software Patents" in 135 Washington and Lee Law Review, volume 41, fall 1984. I know Robert Colwell 136 personally. As a practicing patent attorney, he tells me that, at a minimum, 137 use of an invention "for research purposes" is legitimate. 138 -
debian/changelog
old new 1 ncompress (4.2.4-15) unstable; urgency=low 2 3 * Move to main now that LZW patent has expired (closes: #261282). 4 * Update debian/copyright to be clearer about public domain status. 5 * Move James A. Woods letter from copyright file to README.Debian. 6 * Move detailed location information from copyright file to README.Debian. 7 8 -- Kenneth J. Pronovici <pronovic@debian.org> Wed, 25 Aug 2004 13:38:42 -0500 9 10 ncompress (4.2.4-14) unstable; urgency=low 11 12 * Bumped standards version to 3.6.1 (no package changes). 13 * Fix gcc-3.4 build problem (closes: #260723). 14 - Add -DNOFUNCDEFS to gcc command, to prevent custom prototypes for 15 standard functions from being used by the compiler. 16 17 -- Kenneth J. Pronovici <pronovic@debian.org> Wed, 21 Jul 2004 20:49:01 -0500 18 19 ncompress (4.2.4-13) unstable; urgency=low 20 21 * Disallow maxbits less than 10, to avoid data corruption (closes: #220820). 22 * Added note in debian/README.Debian about 9-bit corruption. 23 24 -- Kenneth J. Pronovici <pronovic@debian.org> Fri, 14 Nov 2003 15:47:08 -0600 25 26 ncompress (4.2.4-12) unstable; urgency=low 27 28 * Upstream source changed (ibiblio.org replaced sunsite.unc.edu). 29 - Updated debian/watch to use correct URL 30 - Updated debian/copyright to note new download location 31 - Updated debian/copyright to clarify packaging history 32 33 -- Kenneth J. Pronovici <pronovic@debian.org> Fri, 19 Sep 2003 10:40:56 -0500 34 35 ncompress (4.2.4-11) unstable; urgency=low 36 37 * Changed debian/README.debian to document (lack of) large file support. 38 * Changed section to 'optional' in debian/control to match overrides. 39 40 -- Kenneth J. Pronovici <pronovic@debian.org> Mon, 14 Apr 2003 15:34:36 -0500 41 42 ncompress (4.2.4-10) unstable; urgency=low 43 44 * New maintainer (closes: #182937). 45 * Updated debian/copyright to reflect new maintainer. 46 * Removed local variables from debian/changelog. 47 * Updated debian/control file. 48 - Reflect new maintainer. 49 - Change standards version to 3.5.9. 50 - Update debhelper depends to (>= 4.0.2). 51 - Rewrite and clarify short and long descriptions. 52 - Fix spelling error in long description (closes: #125169). 53 * Updated comments in debian/README.debian. 54 * Brought debian/rules up to "modern" standards. 55 * Updated debian/copyright to clarify download location. 56 * Added debian/watch file. 57 * Added debian/compat file at compatibility level 4. 58 * Changed prototype of main() in compress42.c, to quiet gcc. 59 * Updated compress.1 manpage (closes: #99585). 60 - Reference 'uncompress.real' rather than 'uncompress'. 61 - No longer reference zcat at all. 62 63 -- Kenneth J. Pronovici <pronovic@debian.org> Mon, 7 Apr 2003 17:52:47 -0500 64 65 ncompress (4.2.4-9.1) unstable; urgency=low 66 67 * NMU based on patch by Stephen Stafford <bagpuss@debian.org>: 68 - FHS transition (closes: #91011, #91596). 69 - Added build-depends on debhelper. 70 - Uncommented call to dh_installdeb so the debhelper postinst and prerm 71 files get installed with the FHS transition symlink stuff. 72 - Bumped standards to 3.5.0. 73 74 -- Colin Watson <cjwatson@debian.org> Wed, 25 Jul 2001 11:52:18 +0100 75 76 ncompress (4.2.4-9) frozen unstable; urgency=low 77 78 * Upload for frozen. 79 80 -- Adam Klein <aklein@debian.org> Thu, 3 Dec 1998 19:57:56 -0800 81 82 ncompress (4.2.4-8) unstable; urgency=low 83 84 * No longer segfaults on long file names. (closes: #26416) 85 * Standards version 2.5.0.0 (no changes). 86 87 -- Adam Klein <aklein@debian.org> Wed, 2 Dec 1998 23:19:45 -0800 88 89 ncompress (4.2.4-7) unstable; urgency=low 90 91 * Removed dh_du invocation from debian/rules 92 93 -- Adam Klein <aklein@debian.org> Wed, 11 Mar 1998 23:17:13 -0500 94 95 ncompress (4.2.4-6) unstable; urgency=low 96 97 * Moved exit status info to DIAGNOSTICS section (closes: #16640) 98 99 -- Adam Klein <aklein@debian.org> Tue, 10 Feb 1998 21:27:56 -0800 100 101 ncompress (4.2.4-5) unstable; urgency=low 102 103 * New maintainer 104 * README.debian now mentions uncompress.real 105 * Treat argv[0] value of "uncompress.real" as "uncompress" (closes: #16621) 106 * Use debhelper (closes: #9674, #14503) 107 * Control file now lists section as non-free/utils 108 * Use standards version 2.4.0.0 109 110 -- Adam Klein <aklein@debian.org> Tue, 27 Jan 1998 09:28:38 -0800 111 112 ncompress (4.2.4-4) unstable; urgency=low 113 114 * Rebuilt for hamm 115 116 -- Christoph Lameter <clameter@waterf.org> Mon, 29 Sep 1997 22:38:22 -0700 117 118 ncompress (4.2.4-3) unstable; urgency=low 119 120 * new Maintainer 121 122 -- Helmut Geyer <Helmut.Geyer@iwr.uni-heidelberg.de> Fri, 6 Jun 1997 07:31:46 +0200 123 124 ncompress (4.2.4-2) unstable; urgency=low 125 126 * install uncompress as uncompress.real since gzip maintainer did not 127 want to use alternative and gzip already installs a link for uncompress 128 to gzip. 129 130 -- Christoph Lameter <clameter@debian.org> Mon, 30 Dec 1996 16:24:03 -0800 131 132 ncompress (4.2.4-1) unstable; urgency=low 133 134 * Initial Release. 135 136 -- Christoph Lameter <clameter@debian.org> Sun, 22 Dec 1996 10:14:17 -0800 137 -
ncompress-4.2.4
old new 1 4 -
debian/control
old new 1 Source: ncompress 2 Section: utils 3 Priority: optional 4 Maintainer: Kenneth J. Pronovici <pronovic@debian.org> 5 Standards-Version: 3.6.1 6 Build-Depends: debhelper (>= 4.0.2) 7 8 Package: ncompress 9 Architecture: any 10 Depends: ${shlibs:Depends} 11 Description: Original Lempel-Ziv compress/uncompress programs 12 This package provides the original programs that are the de facto standard, in 13 much of the UNIX community, for compressing and uncompressing files. The 14 programs implement a fast, simple LZW file compression algorithm. The LZW 15 algorithm does not have as high a rate of compression as some other 16 algorithms, but LZW implementations such as this one often compress files 17 faster than other, similar programs such as gzip. 18 . 19 For Debian, the standard uncompress program is installed as uncompress.real. 20 . 21 This package contains a copyright notice from one of the original authors in 22 the file /usr/doc/ncompress/README.Debian. -
debian/copyright
old new 1 This package was originally debianized by Christoph Lameter on 22 Dec 1996. 2 Since then, it has been maintained by Helmut Geyer, Christoph Lameter and Adam 3 Klein, and is currently maintained by Kenneth J. Pronovici <pronovic@debian.org>. 4 5 It may be downloaded from: ftp://ftp.ibiblio.org/pub/linux/utils/compress/ncompress-4.2.4.tar.Z 6 7 Upstream Authors: Spencer W. Thomas & James A. Woods, 8 Jim McKie, Steve Davies, Ken Turkowski, 9 Joe Orost, Dave Mack, Peter Jannesen 10 11 Copyright: 12 13 Placed in the public domain by Spencer W. Thomas and James A. Woods. 14 See README.Debian for some more background information. 15 -
ncompress-4.2.4
old new 1 usr/bin 2 usr/share/man/man1 -
ncompress-4.2.4
old new 1 #!/usr/bin/make -f 2 3 binary: binary-arch 4 5 binary-arch: build install 6 dh_testdir 7 dh_testroot 8 dh_installdocs Acknowleds README 9 dh_installchangelogs Changes 10 dh_strip 11 dh_fixperms 12 dh_compress 13 dh_installdeb 14 dh_shlibdeps 15 dh_gencontrol 16 dh_md5sums 17 dh_builddeb 18 19 binary-indep: 20 21 install: build 22 dh_testdir 23 dh_testroot 24 dh_installdirs 25 install -o root -g root compress debian/ncompress/usr/bin 26 ln -s compress debian/ncompress/usr/bin/uncompress.real 27 install -o root -g root -m 644 compress.1 debian/ncompress/usr/share/man/man1 28 ln -s compress.1 debian/ncompress/usr/share/man/man1/uncompress.real.1 29 30 build: build-stamp 31 build-stamp: 32 dh_testdir 33 gcc -O2 -g -o compress -DNOFUNCDEF -DCOMPILE_DATE="\"`date`\"" compress42.c 34 touch build-stamp 35 36 configure: 37 38 clean: 39 dh_testdir 40 dh_testroot 41 rm -f build-stamp 42 rm -f compress 43 dh_clean 44 45 .PHONY: binary binary-arch binary-indep install build configure clean -
ncompress-4.2.4
old new 1 version=2 2 ftp://ftp.ibiblio.org/pub/linux/utils/compress/ncompress-(.*)\.tar.Z debian uupdate -
ncompress-4.2.4
old new 1 1 .PU 2 2 .TH COMPRESS 1 local 3 3 .SH NAME 4 compress, uncompress , zcat \- compress and expand data (version 4.1)4 compress, uncompress.real \- compress and expand data (version 4.2) 5 5 .SH SYNOPSIS 6 6 .ll +8 7 7 .B compress … … 23 23 ] 24 24 .ll -8 25 25 .br 26 .B uncompress 26 .B uncompress.real 27 27 [ 28 28 .B \-f 29 29 ] [ … … 36 36 .I "name \&..." 37 37 ] 38 38 .br 39 .B zcat40 [41 .B \-V42 ] [43 .I "name \&..."44 ]45 39 .SH DESCRIPTION 40 .PP 41 Note that the program that would normally be installed as 42 .I uncompress 43 is installed for Debian as 44 .I uncompress.real. 45 This has been done to avoid conflicting with the more-commonly-used 46 program with the same name that is part of the gzip package. 47 .PP 46 48 .I Compress 47 49 reduces the size of the named files using adaptive Lempel-Ziv coding. 48 50 Whenever possible, … … 68 70 the user is prompted as to whether an existing file should be overwritten. 69 71 .PP 70 72 Compressed files can be restored to their original form using 71 .I uncompress 72 or 73 .I zcat. 73 .I uncompress.real. 74 74 .PP 75 .I uncompress 75 .I uncompress.real 76 76 takes a list of files on its command line and replaces each 77 77 file whose name ends with 78 78 .B "\&.Z" … … 85 85 The 86 86 .B \-c 87 87 option makes 88 .I compress/uncompress 88 .I compress/uncompress.real 89 89 write to the standard output; no files are changed. 90 90 .PP 91 .I zcat92 is identical to93 .I uncompress94 .B \-c.95 .I zcat96 uncompresses either a list of files on the command line or its97 standard input and writes the uncompressed data on standard output.98 .I zcat99 will uncompress files that have the correct magic number whether100 they have a101 .B "\&.Z"102 suffix or not.103 .PP104 91 If the 105 92 .B \-r 106 93 flag is specified, … … 148 135 Note that the 149 136 .B \-b 150 137 flag is omitted for 151 .I uncompress ,138 .I uncompress.real, 152 139 since the 153 140 .I bits 154 141 parameter specified during compression … … 175 162 option, 176 163 a message is printed yielding the percentage of 177 164 reduction for each file compressed. 178 .PP179 Exit status is normally 0;180 if the last file is larger after (attempted) compression, the status is 2;181 if an error occurs, exit status is 1.182 165 .SH "SEE ALSO" 183 166 pack(1), compact(1) 184 167 .SH "DIAGNOSTICS" 168 Exit status is normally 0; 169 if the last file is larger after (attempted) compression, the status is 2; 170 if an error occurs, exit status is 1. 171 .PP 185 172 Usage: compress [\-dfvcVr] [\-b maxbits] [file ...] 186 173 .in +8 187 174 Invalid options were specified on the command line. … … 195 182 not in compressed format 196 183 .in +8 197 184 The file specified to 198 .I uncompress 185 .I uncompress.real 199 186 has not been compressed. 200 187 .in -8 201 188 .IR file : … … 272 259 a small process data space (64KB or less, as exhibited by the DEC PDP 273 260 series, the Intel 80286, etc.) 274 261 .PP 275 Invoking compress with a \-r 262 Invoking compress with a 263 .BR \-r 276 264 flag will occasionally cause it to produce spurious error warnings of the form 277 265 .PP 278 266 .in 8 279 267 "<filename>.Z already has .Z suffix - ignored" 280 268 .in -8 281 269 .PP 282 These warnings can be ignored. See the comments in compress .c:compdir()283 for an explanation.270 These warnings can be ignored. See the comments in compress42.c:compdir() 271 in the source distribution for an explanation. 284 272 -
ncompress-4.2.4
old new 230 230 231 231 #define INIT_BITS 9 /* initial number of bits/code */ 232 232 233 #define MIN_MAXBITS 10 /* min value for -b maxbits (smaller causes corruption) */ 234 233 235 #ifndef SACREDMEM 234 236 /* 235 237 * SACREDMEM is the amount of physical memory saved for others; compress … … 638 640 } ; 639 641 #endif 640 642 641 voidmain ARGS((int,char **));643 int main ARGS((int,char **)); 642 644 void Usage ARGS((void)); 643 645 void comprexx ARGS((char **)); 644 646 void compdir ARGS((char *)); … … 691 693 * deterministic, and can be done on the fly. Thus, the decompression 692 694 * procedure needs no input table, but tracks the way the table was built. 693 695 */ 694 void 696 int 695 697 main(argc, argv) 696 698 REG1 int argc; 697 699 REG2 char *argv[]; … … 719 721 else 720 722 progname = argv[0]; 721 723 722 if (strcmp(progname, "uncompress") == 0) 724 if (strcmp(progname, "uncompress") == 0 725 || strcmp(progname, "uncompress.real") == 0) 723 726 do_decomp = 1; 724 727 else 725 728 if (strcmp(progname, "zcat") == 0) … … 819 822 nextarg: continue; 820 823 } 821 824 822 if (maxbits < INIT_BITS) maxbits = INIT_BITS;825 if (maxbits < MIN_MAXBITS) maxbits = MIN_MAXBITS; 823 826 if (maxbits > BITS) maxbits = BITS; 824 827 825 828 if (*filelist != NULL) … … 883 886 int fdout; 884 887 char tempname[MAXPATHLEN]; 885 888 889 if (strlen(*fileptr) > (MAXPATHLEN - 1)) { 890 fprintf(stderr, "Pathname too long: %s\n", *fileptr); 891 return; 892 } 886 893 strcpy(tempname,*fileptr); 887 894 errno = 0; 888 895
Note:
See TracBrowser
for help on using the repository browser.