1167974Sdelphij ------------------------------------------------------------------ 2167974Sdelphij This file is part of bzip2/libbzip2, a program and library for 3167974Sdelphij lossless, block-sorting data compression. 478556Sobrien 5215041Sobrien bzip2/libbzip2 version 1.0.6 of 6 September 2010 6215041Sobrien Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org> 778556Sobrien 8167974Sdelphij Please read the WARNING, DISCLAIMER and PATENTS sections in the 9167974Sdelphij README file. 10167974Sdelphij 11167974Sdelphij This program is released under the terms of the license contained 12167974Sdelphij in the file LICENSE. 13167974Sdelphij ------------------------------------------------------------------ 14167974Sdelphij 15167974Sdelphij 1678556Sobrien0.9.0 1778556Sobrien~~~~~ 1878556SobrienFirst version. 1978556Sobrien 2078556Sobrien 2178556Sobrien0.9.0a 2278556Sobrien~~~~~~ 2378556SobrienRemoved 'ranlib' from Makefile, since most modern Unix-es 2478556Sobriendon't need it, or even know about it. 2578556Sobrien 2678556Sobrien 2778556Sobrien0.9.0b 2878556Sobrien~~~~~~ 2978556SobrienFixed a problem with error reporting in bzip2.c. This does not effect 3078556Sobrienthe library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the 3178556Sobrienprogram proper) compress and decompress correctly, but give misleading 3278556Sobrienerror messages (internal panics) when an I/O error occurs, instead of 3378556Sobrienreporting the problem correctly. This shouldn't give any data loss 3478556Sobrien(as far as I can see), but is confusing. 3578556Sobrien 3678556SobrienMade the inline declarations disappear for non-GCC compilers. 3778556Sobrien 3878556Sobrien 3978556Sobrien0.9.0c 4078556Sobrien~~~~~~ 4178556SobrienFixed some problems in the library pertaining to some boundary cases. 4278556SobrienThis makes the library behave more correctly in those situations. The 4378556Sobrienfixes apply only to features (calls and parameters) not used by 4478556Sobrienbzip2.c, so the non-fixedness of them in previous versions has no 4578556Sobrieneffect on reliability of bzip2.c. 4678556Sobrien 4778556SobrienIn bzlib.c: 4878556Sobrien * made zero-length BZ_FLUSH work correctly in bzCompress(). 4978556Sobrien * fixed bzWrite/bzRead to ignore zero-length requests. 5078556Sobrien * fixed bzread to correctly handle read requests after EOF. 5178556Sobrien * wrong parameter order in call to bzDecompressInit in 5278556Sobrien bzBuffToBuffDecompress. Fixed. 5378556Sobrien 5478556SobrienIn compress.c: 5578556Sobrien * changed setting of nGroups in sendMTFValues() so as to 5678556Sobrien do a bit better on small files. This _does_ effect 5778556Sobrien bzip2.c. 5878556Sobrien 5978556Sobrien 6078556Sobrien0.9.5a 6178556Sobrien~~~~~~ 6278556SobrienMajor change: add a fallback sorting algorithm (blocksort.c) 6378556Sobriento give reasonable behaviour even for very repetitive inputs. 6478556SobrienNuked --repetitive-best and --repetitive-fast since they are 6578556Sobrienno longer useful. 6678556Sobrien 6778556SobrienMinor changes: mostly a whole bunch of small changes/ 6878556Sobrienbugfixes in the driver (bzip2.c). Changes pertaining to the 6978556Sobrienuser interface are: 7078556Sobrien 7178556Sobrien allow decompression of symlink'd files to stdout 7278556Sobrien decompress/test files even without .bz2 extension 7378556Sobrien give more accurate error messages for I/O errors 7478556Sobrien when compressing/decompressing to stdout, don't catch control-C 7578556Sobrien read flags from BZIP2 and BZIP environment variables 7678556Sobrien decline to break hard links to a file unless forced with -f 7778556Sobrien allow -c flag even with no filenames 7878556Sobrien preserve file ownerships as far as possible 7978556Sobrien make -s -1 give the expected block size (100k) 8078556Sobrien add a flag -q --quiet to suppress nonessential warnings 8178556Sobrien stop decoding flags after --, so files beginning in - can be handled 8278556Sobrien resolved inconsistent naming: bzcat or bz2cat ? 8378556Sobrien bzip2 --help now returns 0 8478556Sobrien 8578556SobrienProgramming-level changes are: 8678556Sobrien 8778556Sobrien fixed syntax error in GET_LL4 for Borland C++ 5.02 8878556Sobrien let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} 8978556Sobrien fix overshoot of mode-string end in bzopen_or_bzdopen 9078556Sobrien wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } 9178556Sobrien close file handles under all error conditions 9278556Sobrien added minor mods so it compiles with DJGPP out of the box 9378556Sobrien fixed Makefile so it doesn't give problems with BSD make 9478556Sobrien fix uninitialised memory reads in dlltest.c 9578556Sobrien 9678556Sobrien0.9.5b 9778556Sobrien~~~~~~ 9878556SobrienOpen stdin/stdout in binary mode for DJGPP. 9978556Sobrien 10078556Sobrien0.9.5c 10178556Sobrien~~~~~~ 10278556SobrienChanged BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 10378556Sobrienversion could cause the sorted order to be wrong in some extremely 10478556Sobrienobscure cases. Also changed setting of quadrant in blocksort.c. 10578556Sobrien 10678556Sobrien0.9.5d 10778556Sobrien~~~~~~ 10878556SobrienThe only functional change is to make bzlibVersion() in the library 10978556Sobrienreturn the correct string. This has no effect whatsoever on the 11078556Sobrienfunctioning of the bzip2 program or library. Added a couple of casts 11178556Sobrienso the library compiles without warnings at level 3 in MS Visual 11278556SobrienStudio 6.0. Included a Y2K statement in the file Y2K_INFO. All other 11378556Sobrienchanges are minor documentation changes. 11478556Sobrien 11578556Sobrien1.0 11678556Sobrien~~~ 11778556SobrienSeveral minor bugfixes and enhancements: 11878556Sobrien 11978556Sobrien* Large file support. The library uses 64-bit counters to 12078556Sobrien count the volume of data passing through it. bzip2.c 12178556Sobrien is now compiled with -D_FILE_OFFSET_BITS=64 to get large 12278556Sobrien file support from the C library. -v correctly prints out 12378556Sobrien file sizes greater than 4 gigabytes. All these changes have 12478556Sobrien been made without assuming a 64-bit platform or a C compiler 12578556Sobrien which supports 64-bit ints, so, except for the C library 12678556Sobrien aspect, they are fully portable. 12778556Sobrien 12878556Sobrien* Decompression robustness. The library/program should be 12978556Sobrien robust to any corruption of compressed data, detecting and 13078556Sobrien handling _all_ corruption, instead of merely relying on 13178556Sobrien the CRCs. What this means is that the program should 13278556Sobrien never crash, given corrupted data, and the library should 13378556Sobrien always return BZ_DATA_ERROR. 13478556Sobrien 13578556Sobrien* Fixed an obscure race-condition bug only ever observed on 13678556Sobrien Solaris, in which, if you were very unlucky and issued 13778556Sobrien control-C at exactly the wrong time, both input and output 13878556Sobrien files would be deleted. 13978556Sobrien 14078556Sobrien* Don't run out of file handles on test/decompression when 14178556Sobrien large numbers of files have invalid magic numbers. 14278556Sobrien 14378556Sobrien* Avoid library namespace pollution. Prefix all exported 14478556Sobrien symbols with BZ2_. 14578556Sobrien 14678556Sobrien* Minor sorting enhancements from my DCC2000 paper. 14778556Sobrien 14878556Sobrien* Advance the version number to 1.0, so as to counteract the 14978556Sobrien (false-in-this-case) impression some people have that programs 15090067Ssobomax with version numbers less than 1.0 are in some way, experimental, 15178556Sobrien pre-release versions. 15278556Sobrien 15378556Sobrien* Create an initial Makefile-libbz2_so to build a shared library. 15478556Sobrien Yes, I know I should really use libtool et al ... 15578556Sobrien 15678556Sobrien* Make the program exit with 2 instead of 0 when decompression 15778556Sobrien fails due to a bad magic number (ie, an invalid bzip2 header). 15878556Sobrien Also exit with 1 (as the manual claims :-) whenever a diagnostic 15978556Sobrien message would have been printed AND the corresponding operation 16078556Sobrien is aborted, for example 16178556Sobrien bzip2: Output file xx already exists. 16278556Sobrien When a diagnostic message is printed but the operation is not 16378556Sobrien aborted, for example 16478556Sobrien bzip2: Can't guess original name for wurble -- using wurble.out 16578556Sobrien then the exit value 0 is returned, unless some other problem is 16678556Sobrien also detected. 16778556Sobrien 16878556Sobrien I think it corresponds more closely to what the manual claims now. 16978556Sobrien 17078556Sobrien 17178556Sobrien1.0.1 17278556Sobrien~~~~~ 17378556Sobrien* Modified dlltest.c so it uses the new BZ2_ naming scheme. 17478556Sobrien* Modified makefile-msc to fix minor build probs on Win2k. 17578556Sobrien* Updated README.COMPILATION.PROBLEMS. 17678556Sobrien 17778556SobrienThere are no functionality changes or bug fixes relative to version 17878556Sobrien1.0.0. This is just a documentation update + a fix for minor Win32 17978556Sobrienbuild problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is 18078556Sobrienutterly pointless. Don't bother. 18190067Ssobomax 18290067Ssobomax 18390067Ssobomax1.0.2 18490067Ssobomax~~~~~ 18590067SsobomaxA bug fix release, addressing various minor issues which have appeared 18690067Ssobomaxin the 18 or so months since 1.0.1 was released. Most of the fixes 18790067Ssobomaxare to do with file-handling or documentation bugs. To the best of my 18890067Ssobomaxknowledge, there have been no data-loss-causing bugs reported in the 18990067Ssobomaxcompression/decompression engine of 1.0.0 or 1.0.1. 19090067Ssobomax 19190067SsobomaxNote that this release does not improve the rather crude build system 19290067Ssobomaxfor Unix platforms. The general plan here is to autoconfiscate/ 19390067Ssobomaxlibtoolise 1.0.2 soon after release, and release the result as 1.1.0 19490067Ssobomaxor perhaps 1.2.0. That, however, is still just a plan at this point. 19590067Ssobomax 19690067SsobomaxHere are the changes in 1.0.2. Bug-reporters and/or patch-senders in 19790067Ssobomaxparentheses. 19890067Ssobomax 19990067Ssobomax* Fix an infinite segfault loop in 1.0.1 when a directory is 20090067Ssobomax encountered in -f (force) mode. 20190067Ssobomax (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) 20290067Ssobomax 20390067Ssobomax* Avoid double fclose() of output file on certain I/O error paths. 20490067Ssobomax (Solar Designer) 20590067Ssobomax 20690067Ssobomax* Don't fail with internal error 1007 when fed a long stream (> 48MB) 20790067Ssobomax of byte 251. Also print useful message suggesting that 1007s may be 20890067Ssobomax caused by bad memory. 20990067Ssobomax (noticed by Juan Pedro Vallejo, fixed by me) 21090067Ssobomax 21190067Ssobomax* Fix uninitialised variable silly bug in demo prog dlltest.c. 21290067Ssobomax (Jorj Bauer) 21390067Ssobomax 21490067Ssobomax* Remove 512-MB limitation on recovered file size for bzip2recover 21590067Ssobomax on selected platforms which support 64-bit ints. At the moment 21690067Ssobomax all GCC supported platforms, and Win32. 21790067Ssobomax (me, Alson van der Meulen) 21890067Ssobomax 21990067Ssobomax* Hard-code header byte values, to give correct operation on platforms 22090067Ssobomax using EBCDIC as their native character set (IBM's OS/390). 22190067Ssobomax (Leland Lucius) 22290067Ssobomax 22390067Ssobomax* Copy file access times correctly. 22490067Ssobomax (Marty Leisner) 22590067Ssobomax 22690067Ssobomax* Add distclean and check targets to Makefile. 22790067Ssobomax (Michael Carmack) 22890067Ssobomax 22990067Ssobomax* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). 23090067Ssobomax (Rich Ireland, Bo Thorsen) 23190067Ssobomax 23290067Ssobomax* Pass -p (create parent dirs as needed) to mkdir during make install. 23390067Ssobomax (Jeremy Fusco) 23490067Ssobomax 23590067Ssobomax* Dereference symlinks when copying file permissions in -f mode. 23690067Ssobomax (Volker Schmidt) 23790067Ssobomax 23890067Ssobomax* Majorly simplify implementation of uInt64_qrm10. 23990067Ssobomax (Bo Lindbergh) 24090067Ssobomax 24190067Ssobomax* Check the input file still exists before deleting the output one, 24290067Ssobomax when aborting in cleanUpAndFail(). 24390067Ssobomax (Joerg Prante, Robert Linden, Matthias Krings) 24490067Ssobomax 24590067SsobomaxAlso a bunch of patches courtesy of Philippe Troin, the Debian maintainer 24690067Ssobomaxof bzip2: 24790067Ssobomax 24890067Ssobomax* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. 24990067Ssobomax 25090067Ssobomax* Spelling changes and minor enhancements in bzip2.1. 25190067Ssobomax 25290067Ssobomax* Avoid race condition between creating the output file and setting its 25390067Ssobomax interim permissions safely, by using fopen_output_safely(). 25490067Ssobomax No changes to bzip2recover since there is no issue with file 25590067Ssobomax permissions there. 25690067Ssobomax 25790067Ssobomax* do not print senseless report with -v when compressing an empty 25890067Ssobomax file. 25990067Ssobomax 26090067Ssobomax* bzcat -f works on non-bzip2 files. 26190067Ssobomax 26290067Ssobomax* do not try to escape shell meta-characters on unix (the shell takes 26390067Ssobomax care of these). 26490067Ssobomax 26590067Ssobomax* added --fast and --best aliases for -1 -9 for gzip compatibility. 26690067Ssobomax 267146293Sobrien 268146293Sobrien1.0.3 (15 Feb 05) 269146293Sobrien~~~~~~~~~~~~~~~~~ 270146293SobrienFixes some minor bugs since the last version, 1.0.2. 271146293Sobrien 272146293Sobrien* Further robustification against corrupted compressed data. 273146293Sobrien There are currently no known bitstreams which can cause the 274146293Sobrien decompressor to crash, loop or access memory which does not 275146293Sobrien belong to it. If you are using bzip2 or the library to 276146293Sobrien decompress bitstreams from untrusted sources, an upgrade 277167974Sdelphij to 1.0.3 is recommended. This fixes CAN-2005-1260. 278146293Sobrien 279146293Sobrien* The documentation has been converted to XML, from which html 280146293Sobrien and pdf can be derived. 281146293Sobrien 282146293Sobrien* Various minor bugs in the documentation have been fixed. 283146293Sobrien 284146293Sobrien* Fixes for various compilation warnings with newer versions of 285146293Sobrien gcc, and on 64-bit platforms. 286146293Sobrien 287146293Sobrien* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. 288146293Sobrien This has been fixed. 289167974Sdelphij 290167974Sdelphij 291167974Sdelphij1.0.4 (20 Dec 06) 292167974Sdelphij~~~~~~~~~~~~~~~~~ 293167974SdelphijFixes some minor bugs since the last version, 1.0.3. 294167974Sdelphij 295167974Sdelphij* Fix file permissions race problem (CAN-2005-0953). 296167974Sdelphij 297167974Sdelphij* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD 298167974Sdelphij scan. 299167974Sdelphij 300167974Sdelphij* 'const'/prototype cleanups in the C code. 301167974Sdelphij 302167974Sdelphij* Change default install location to /usr/local, and handle multiple 303167974Sdelphij 'make install's without error. 304167974Sdelphij 305167974Sdelphij* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 306167974Sdelphij to the extent that applies to bzgrep. 307167974Sdelphij 308167974Sdelphij* Use 'mktemp' rather than 'tempfile' in bzdiff. 309167974Sdelphij 310167974Sdelphij* Tighten up a couple of assertions in blocksort.c following automated 311167974Sdelphij analysis. 312167974Sdelphij 313167974Sdelphij* Fix minor doc/comment bugs. 314167974Sdelphij 315177420Sdelphij 316177420Sdelphij1.0.5 (10 Dec 07) 317177420Sdelphij~~~~~~~~~~~~~~~~~ 318177420SdelphijSecurity fix only. Fixes CERT-FI 20469 as it applies to bzip2. 319177420Sdelphij 320215041Sobrien 321215041Sobrien1.0.6 (6 Sept 10) 322215041Sobrien~~~~~~~~~~~~~~~~~ 323215041Sobrien 324215041Sobrien* Security fix for CVE-2010-0405. This was reported by Mikolaj 325215041Sobrien Izdebski. 326215041Sobrien 327215041Sobrien* Make the documentation build on Ubuntu 10.04 328