CHANGES revision 285830
168349Sobrien ------------------------------------------------------------------
268349Sobrien This file is part of bzip2/libbzip2, a program and library for
368349Sobrien lossless, block-sorting data compression.
4186690Sobrien
568349Sobrien bzip2/libbzip2 version 1.0.6 of 6 September 2010
668349Sobrien Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
768349Sobrien
868349Sobrien Please read the WARNING, DISCLAIMER and PATENTS sections in the 
968349Sobrien README file.
1068349Sobrien
1168349Sobrien This program is released under the terms of the license contained
12186690Sobrien in the file LICENSE.
13186690Sobrien ------------------------------------------------------------------
14186690Sobrien
15186690Sobrien
16186690Sobrien0.9.0
17186690Sobrien~~~~~
18186690SobrienFirst version.
19186690Sobrien
20186690Sobrien
21186690Sobrien0.9.0a
22186690Sobrien~~~~~~
23186690SobrienRemoved 'ranlib' from Makefile, since most modern Unix-es 
24186690Sobriendon't need it, or even know about it.
25186690Sobrien
26186690Sobrien
27186690Sobrien0.9.0b
28186690Sobrien~~~~~~
2968349SobrienFixed a problem with error reporting in bzip2.c.  This does not effect
3068349Sobrienthe library in any way.  Problem is: versions 0.9.0 and 0.9.0a (of the
3175937Sobrienprogram proper) compress and decompress correctly, but give misleading
3268349Sobrienerror messages (internal panics) when an I/O error occurs, instead of
3368349Sobrienreporting the problem correctly.  This shouldn't give any data loss
3468349Sobrien(as far as I can see), but is confusing.
3568349Sobrien
3668349SobrienMade the inline declarations disappear for non-GCC compilers.
3768349Sobrien
3868349Sobrien
3975937Sobrien0.9.0c
4075937Sobrien~~~~~~
4175937SobrienFixed some problems in the library pertaining to some boundary cases.
4275937SobrienThis makes the library behave more correctly in those situations.  The
4375937Sobrienfixes apply only to features (calls and parameters) not used by
4475937Sobrienbzip2.c, so the non-fixedness of them in previous versions has no
4575937Sobrieneffect on reliability of bzip2.c.
4675937Sobrien
47133359SobrienIn bzlib.c:
48133359Sobrien   * made zero-length BZ_FLUSH work correctly in bzCompress().
49133359Sobrien   * fixed bzWrite/bzRead to ignore zero-length requests.
50133359Sobrien   * fixed bzread to correctly handle read requests after EOF.
51133359Sobrien   * wrong parameter order in call to bzDecompressInit in
52133359Sobrien     bzBuffToBuffDecompress.  Fixed.
53133359Sobrien
5468349SobrienIn compress.c:
5568349Sobrien   * changed setting of nGroups in sendMTFValues() so as to 
5668349Sobrien     do a bit better on small files.  This _does_ effect
5768349Sobrien     bzip2.c.
5868349Sobrien
5968349Sobrien
6068349Sobrien0.9.5a
6168349Sobrien~~~~~~
6268349SobrienMajor change: add a fallback sorting algorithm (blocksort.c)
6368349Sobriento give reasonable behaviour even for very repetitive inputs.
6468349SobrienNuked --repetitive-best and --repetitive-fast since they are
6568349Sobrienno longer useful.
6668349Sobrien
6768349SobrienMinor changes: mostly a whole bunch of small changes/
6868349Sobrienbugfixes in the driver (bzip2.c).  Changes pertaining to the
6968349Sobrienuser interface are:
7068349Sobrien
7168349Sobrien   allow decompression of symlink'd files to stdout
7268349Sobrien   decompress/test files even without .bz2 extension
7368349Sobrien   give more accurate error messages for I/O errors
7468349Sobrien   when compressing/decompressing to stdout, don't catch control-C
7568349Sobrien   read flags from BZIP2 and BZIP environment variables
7668349Sobrien   decline to break hard links to a file unless forced with -f
7768349Sobrien   allow -c flag even with no filenames
7868349Sobrien   preserve file ownerships as far as possible
7968349Sobrien   make -s -1 give the expected block size (100k)
8068349Sobrien   add a flag -q --quiet to suppress nonessential warnings
8168349Sobrien   stop decoding flags after --, so files beginning in - can be handled
8268349Sobrien   resolved inconsistent naming: bzcat or bz2cat ?
8368349Sobrien   bzip2 --help now returns 0
8468349Sobrien
8568349SobrienProgramming-level changes are:
8675937Sobrien
8775937Sobrien   fixed syntax error in GET_LL4 for Borland C++ 5.02
8875937Sobrien   let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC}
8975937Sobrien   fix overshoot of mode-string end in bzopen_or_bzdopen
9068349Sobrien   wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... }
9168349Sobrien   close file handles under all error conditions
9268349Sobrien   added minor mods so it compiles with DJGPP out of the box
9368349Sobrien   fixed Makefile so it doesn't give problems with BSD make
9468349Sobrien   fix uninitialised memory reads in dlltest.c
9568349Sobrien
9668349Sobrien0.9.5b
9775937Sobrien~~~~~~
9875937SobrienOpen stdin/stdout in binary mode for DJGPP.
9975937Sobrien
10075937Sobrien0.9.5c
10168349Sobrien~~~~~~
10268349SobrienChanged BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1.  The + 1
10368349Sobrienversion could cause the sorted order to be wrong in some extremely
10468349Sobrienobscure cases.  Also changed setting of quadrant in blocksort.c.
10568349Sobrien
10668349Sobrien0.9.5d
10768349Sobrien~~~~~~
10868349SobrienThe only functional change is to make bzlibVersion() in the library
10968349Sobrienreturn the correct string.  This has no effect whatsoever on the
11068349Sobrienfunctioning of the bzip2 program or library.  Added a couple of casts
11168349Sobrienso the library compiles without warnings at level 3 in MS Visual
11268349SobrienStudio 6.0.  Included a Y2K statement in the file Y2K_INFO.  All other
11368349Sobrienchanges are minor documentation changes.
11468349Sobrien
11568349Sobrien1.0
11668349Sobrien~~~
11768349SobrienSeveral minor bugfixes and enhancements:
11868349Sobrien
11968349Sobrien* Large file support.  The library uses 64-bit counters to
12068349Sobrien  count the volume of data passing through it.  bzip2.c 
12168349Sobrien  is now compiled with -D_FILE_OFFSET_BITS=64 to get large
12268349Sobrien  file support from the C library.  -v correctly prints out
12368349Sobrien  file sizes greater than 4 gigabytes.  All these changes have
12468349Sobrien  been made without assuming a 64-bit platform or a C compiler
12568349Sobrien  which supports 64-bit ints, so, except for the C library
12668349Sobrien  aspect, they are fully portable.
12768349Sobrien
12868349Sobrien* Decompression robustness.  The library/program should be
12968349Sobrien  robust to any corruption of compressed data, detecting and
13068349Sobrien  handling _all_ corruption, instead of merely relying on
13168349Sobrien  the CRCs.  What this means is that the program should 
13268349Sobrien  never crash, given corrupted data, and the library should
13368349Sobrien  always return BZ_DATA_ERROR.
13468349Sobrien
13568349Sobrien* Fixed an obscure race-condition bug only ever observed on
13668349Sobrien  Solaris, in which, if you were very unlucky and issued
137186690Sobrien  control-C at exactly the wrong time, both input and output
138186690Sobrien  files would be deleted.
139186690Sobrien
140186690Sobrien* Don't run out of file handles on test/decompression when
141186690Sobrien  large numbers of files have invalid magic numbers.
142186690Sobrien
14368349Sobrien* Avoid library namespace pollution.  Prefix all exported 
14468349Sobrien  symbols with BZ2_.
14568349Sobrien
14668349Sobrien* Minor sorting enhancements from my DCC2000 paper.
147133359Sobrien
148133359Sobrien* Advance the version number to 1.0, so as to counteract the
149133359Sobrien  (false-in-this-case) impression some people have that programs 
150133359Sobrien  with version numbers less than 1.0 are in some way, experimental,
151133359Sobrien  pre-release versions.
152133359Sobrien
153133359Sobrien* Create an initial Makefile-libbz2_so to build a shared library.
154133359Sobrien  Yes, I know I should really use libtool et al ...
155133359Sobrien
156133359Sobrien* Make the program exit with 2 instead of 0 when decompression
157133359Sobrien  fails due to a bad magic number (ie, an invalid bzip2 header).
158133359Sobrien  Also exit with 1 (as the manual claims :-) whenever a diagnostic
159133359Sobrien  message would have been printed AND the corresponding operation 
160133359Sobrien  is aborted, for example
161133359Sobrien     bzip2: Output file xx already exists.
162133359Sobrien  When a diagnostic message is printed but the operation is not 
163133359Sobrien  aborted, for example
164133359Sobrien     bzip2: Can't guess original name for wurble -- using wurble.out
165133359Sobrien  then the exit value 0 is returned, unless some other problem is
166133359Sobrien  also detected.
167133359Sobrien
168159764Sobrien  I think it corresponds more closely to what the manual claims now.
169159764Sobrien
170159764Sobrien
171159764Sobrien1.0.1
172159764Sobrien~~~~~
173159764Sobrien* Modified dlltest.c so it uses the new BZ2_ naming scheme.
174159764Sobrien* Modified makefile-msc to fix minor build probs on Win2k.
175159764Sobrien* Updated README.COMPILATION.PROBLEMS.
176159764Sobrien
177159764SobrienThere are no functionality changes or bug fixes relative to version
178159764Sobrien1.0.0.  This is just a documentation update + a fix for minor Win32
179159764Sobrienbuild problems.  For almost everyone, upgrading from 1.0.0 to 1.0.1 is
180159764Sobrienutterly pointless.  Don't bother.
181159764Sobrien
182159764Sobrien
183159764Sobrien1.0.2
184159764Sobrien~~~~~
185159764SobrienA bug fix release, addressing various minor issues which have appeared
186159764Sobrienin the 18 or so months since 1.0.1 was released.  Most of the fixes
187159764Sobrienare to do with file-handling or documentation bugs.  To the best of my
188159764Sobrienknowledge, there have been no data-loss-causing bugs reported in the
189159764Sobriencompression/decompression engine of 1.0.0 or 1.0.1.
190159764Sobrien
191159764SobrienNote that this release does not improve the rather crude build system
192159764Sobrienfor Unix platforms.  The general plan here is to autoconfiscate/
193159764Sobrienlibtoolise 1.0.2 soon after release, and release the result as 1.1.0
194159764Sobrienor perhaps 1.2.0.  That, however, is still just a plan at this point.
195159764Sobrien
196159764SobrienHere are the changes in 1.0.2.  Bug-reporters and/or patch-senders in
197159764Sobrienparentheses.
198159764Sobrien
199159764Sobrien* Fix an infinite segfault loop in 1.0.1 when a directory is
200159764Sobrien  encountered in -f (force) mode.
201159764Sobrien     (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt)
202159764Sobrien
203159764Sobrien* Avoid double fclose() of output file on certain I/O error paths.
204159764Sobrien     (Solar Designer)
205159764Sobrien
206159764Sobrien* Don't fail with internal error 1007 when fed a long stream (> 48MB)
207159764Sobrien  of byte 251.  Also print useful message suggesting that 1007s may be
208159764Sobrien  caused by bad memory.
209175296Sobrien     (noticed by Juan Pedro Vallejo, fixed by me)
210175296Sobrien
211175296Sobrien* Fix uninitialised variable silly bug in demo prog dlltest.c.
212175296Sobrien     (Jorj Bauer)
213175296Sobrien
214175296Sobrien* Remove 512-MB limitation on recovered file size for bzip2recover
215175296Sobrien  on selected platforms which support 64-bit ints.  At the moment
216175296Sobrien  all GCC supported platforms, and Win32.
217175296Sobrien     (me, Alson van der Meulen)
218175296Sobrien
219175296Sobrien* Hard-code header byte values, to give correct operation on platforms
220175296Sobrien  using EBCDIC as their native character set (IBM's OS/390).
221175296Sobrien     (Leland Lucius)
222175296Sobrien
223175296Sobrien* Copy file access times correctly.
224175296Sobrien     (Marty Leisner)
225175296Sobrien
226175296Sobrien* Add distclean and check targets to Makefile.
227175296Sobrien     (Michael Carmack)
228175296Sobrien
229175296Sobrien* Parameterise use of ar and ranlib in Makefile.  Also add $(LDFLAGS).
230175296Sobrien     (Rich Ireland, Bo Thorsen)
231175296Sobrien
232175296Sobrien* Pass -p (create parent dirs as needed) to mkdir during make install.
233175296Sobrien     (Jeremy Fusco)
234175296Sobrien
235175296Sobrien* Dereference symlinks when copying file permissions in -f mode.
236175296Sobrien     (Volker Schmidt)
237175296Sobrien
238175296Sobrien* Majorly simplify implementation of uInt64_qrm10.
239175296Sobrien     (Bo Lindbergh)
240175296Sobrien
241175296Sobrien* Check the input file still exists before deleting the output one,
242175296Sobrien  when aborting in cleanUpAndFail().
243175296Sobrien     (Joerg Prante, Robert Linden, Matthias Krings)
244175296Sobrien
245175296SobrienAlso a bunch of patches courtesy of Philippe Troin, the Debian maintainer
246175296Sobrienof bzip2:
247175296Sobrien
248175296Sobrien* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore.
249175296Sobrien
250* Spelling changes and minor enhancements in bzip2.1.
251
252* Avoid race condition between creating the output file and setting its
253  interim permissions safely, by using fopen_output_safely().
254  No changes to bzip2recover since there is no issue with file
255  permissions there.
256
257* do not print senseless report with -v when compressing an empty
258  file.
259
260* bzcat -f works on non-bzip2 files.
261
262* do not try to escape shell meta-characters on unix (the shell takes
263  care of these).
264
265* added --fast and --best aliases for -1 -9 for gzip compatibility.
266
267
2681.0.3 (15 Feb 05)
269~~~~~~~~~~~~~~~~~
270Fixes some minor bugs since the last version, 1.0.2.
271
272* Further robustification against corrupted compressed data.
273  There are currently no known bitstreams which can cause the
274  decompressor to crash, loop or access memory which does not
275  belong to it.  If you are using bzip2 or the library to 
276  decompress bitstreams from untrusted sources, an upgrade
277  to 1.0.3 is recommended.  This fixes CAN-2005-1260.
278
279* The documentation has been converted to XML, from which html
280  and pdf can be derived.
281
282* Various minor bugs in the documentation have been fixed.
283
284* Fixes for various compilation warnings with newer versions of
285  gcc, and on 64-bit platforms.
286
287* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2.
288  This has been fixed.
289
290
2911.0.4 (20 Dec 06)
292~~~~~~~~~~~~~~~~~
293Fixes some minor bugs since the last version, 1.0.3.
294
295* Fix file permissions race problem (CAN-2005-0953).
296
297* Avoid possible segfault in BZ2_bzclose.  From Coverity's NetBSD
298  scan.
299
300* 'const'/prototype cleanups in the C code.
301
302* Change default install location to /usr/local, and handle multiple
303  'make install's without error.
304
305* Sanitise file names more carefully in bzgrep.  Fixes CAN-2005-0758
306  to the extent that applies to bzgrep.
307
308* Use 'mktemp' rather than 'tempfile' in bzdiff.
309
310* Tighten up a couple of assertions in blocksort.c following automated
311  analysis.
312
313* Fix minor doc/comment bugs.
314
315
3161.0.5 (10 Dec 07)
317~~~~~~~~~~~~~~~~~
318Security fix only.  Fixes CERT-FI 20469 as it applies to bzip2.
319
320
3211.0.6 (6 Sept 10)
322~~~~~~~~~~~~~~~~~
323
324* Security fix for CVE-2010-0405.  This was reported by Mikolaj
325  Izdebski.
326
327* Make the documentation build on Ubuntu 10.04
328