CHANGES revision 256281
1194612Sed ------------------------------------------------------------------
2194612Sed This file is part of bzip2/libbzip2, a program and library for
3194612Sed lossless, block-sorting data compression.
4194612Sed
5194612Sed bzip2/libbzip2 version 1.0.6 of 6 September 2010
6194612Sed Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
7194612Sed
8194612Sed Please read the WARNING, DISCLAIMER and PATENTS sections in the 
9194612Sed README file.
10194612Sed
11194612Sed This program is released under the terms of the license contained
12194612Sed in the file LICENSE.
13194612Sed ------------------------------------------------------------------
14194612Sed
15195098Sed
16195098Sed0.9.0
17195098Sed~~~~~
18194612SedFirst version.
19194612Sed
20194612Sed
21194612Sed0.9.0a
22194612Sed~~~~~~
23194612SedRemoved 'ranlib' from Makefile, since most modern Unix-es 
24194612Seddon't need it, or even know about it.
25194612Sed
26194612Sed
27194612Sed0.9.0b
28194612Sed~~~~~~
29194612SedFixed a problem with error reporting in bzip2.c.  This does not effect
30194612Sedthe library in any way.  Problem is: versions 0.9.0 and 0.9.0a (of the
31194612Sedprogram proper) compress and decompress correctly, but give misleading
32194612Sederror messages (internal panics) when an I/O error occurs, instead of
33194612Sedreporting the problem correctly.  This shouldn't give any data loss
34194612Sed(as far as I can see), but is confusing.
35194612Sed
36194612SedMade the inline declarations disappear for non-GCC compilers.
37194612Sed
38194612Sed
39194612Sed0.9.0c
40194612Sed~~~~~~
41194612SedFixed some problems in the library pertaining to some boundary cases.
42194612SedThis makes the library behave more correctly in those situations.  The
43194612Sedfixes apply only to features (calls and parameters) not used by
44194612Sedbzip2.c, so the non-fixedness of them in previous versions has no
45194612Sedeffect on reliability of bzip2.c.
46194612Sed
47194612SedIn bzlib.c:
48194612Sed   * made zero-length BZ_FLUSH work correctly in bzCompress().
49194612Sed   * fixed bzWrite/bzRead to ignore zero-length requests.
50194612Sed   * fixed bzread to correctly handle read requests after EOF.
51194612Sed   * wrong parameter order in call to bzDecompressInit in
52194612Sed     bzBuffToBuffDecompress.  Fixed.
53194612Sed
54194612SedIn compress.c:
55194612Sed   * changed setting of nGroups in sendMTFValues() so as to 
56194612Sed     do a bit better on small files.  This _does_ effect
57194612Sed     bzip2.c.
58194612Sed
59194612Sed
60194612Sed0.9.5a
61194612Sed~~~~~~
62194612SedMajor change: add a fallback sorting algorithm (blocksort.c)
63194612Sedto give reasonable behaviour even for very repetitive inputs.
64194612SedNuked --repetitive-best and --repetitive-fast since they are
65194612Sedno longer useful.
66194612Sed
67194612SedMinor changes: mostly a whole bunch of small changes/
68194612Sedbugfixes in the driver (bzip2.c).  Changes pertaining to the
69194612Seduser interface are:
70194612Sed
71194612Sed   allow decompression of symlink'd files to stdout
72194612Sed   decompress/test files even without .bz2 extension
73194612Sed   give more accurate error messages for I/O errors
74194612Sed   when compressing/decompressing to stdout, don't catch control-C
75194612Sed   read flags from BZIP2 and BZIP environment variables
76194612Sed   decline to break hard links to a file unless forced with -f
77194612Sed   allow -c flag even with no filenames
78194612Sed   preserve file ownerships as far as possible
79194612Sed   make -s -1 give the expected block size (100k)
80194612Sed   add a flag -q --quiet to suppress nonessential warnings
81194612Sed   stop decoding flags after --, so files beginning in - can be handled
82194612Sed   resolved inconsistent naming: bzcat or bz2cat ?
83194612Sed   bzip2 --help now returns 0
84194612Sed
85194612SedProgramming-level changes are:
86194612Sed
87194612Sed   fixed syntax error in GET_LL4 for Borland C++ 5.02
88194612Sed   let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC}
89194612Sed   fix overshoot of mode-string end in bzopen_or_bzdopen
90194612Sed   wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... }
91194612Sed   close file handles under all error conditions
92194612Sed   added minor mods so it compiles with DJGPP out of the box
93194612Sed   fixed Makefile so it doesn't give problems with BSD make
94194612Sed   fix uninitialised memory reads in dlltest.c
95194612Sed
96194612Sed0.9.5b
97194612Sed~~~~~~
98194612SedOpen stdin/stdout in binary mode for DJGPP.
99194612Sed
100194612Sed0.9.5c
101194612Sed~~~~~~
102194612SedChanged BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1.  The + 1
103194612Sedversion could cause the sorted order to be wrong in some extremely
104194612Sedobscure cases.  Also changed setting of quadrant in blocksort.c.
105194612Sed
106194612Sed0.9.5d
107194612Sed~~~~~~
108194612SedThe only functional change is to make bzlibVersion() in the library
109194612Sedreturn the correct string.  This has no effect whatsoever on the
110194612Sedfunctioning of the bzip2 program or library.  Added a couple of casts
111194612Sedso the library compiles without warnings at level 3 in MS Visual
112194612SedStudio 6.0.  Included a Y2K statement in the file Y2K_INFO.  All other
113194612Sedchanges are minor documentation changes.
114194612Sed
115194612Sed1.0
116194612Sed~~~
117194612SedSeveral minor bugfixes and enhancements:
118194612Sed
119194612Sed* Large file support.  The library uses 64-bit counters to
120194612Sed  count the volume of data passing through it.  bzip2.c 
121194612Sed  is now compiled with -D_FILE_OFFSET_BITS=64 to get large
122194612Sed  file support from the C library.  -v correctly prints out
123194612Sed  file sizes greater than 4 gigabytes.  All these changes have
124194612Sed  been made without assuming a 64-bit platform or a C compiler
125194612Sed  which supports 64-bit ints, so, except for the C library
126194612Sed  aspect, they are fully portable.
127194612Sed
128194612Sed* Decompression robustness.  The library/program should be
129194612Sed  robust to any corruption of compressed data, detecting and
130194612Sed  handling _all_ corruption, instead of merely relying on
131194612Sed  the CRCs.  What this means is that the program should 
132194612Sed  never crash, given corrupted data, and the library should
133194612Sed  always return BZ_DATA_ERROR.
134194612Sed
135194612Sed* Fixed an obscure race-condition bug only ever observed on
136194612Sed  Solaris, in which, if you were very unlucky and issued
137194612Sed  control-C at exactly the wrong time, both input and output
138194612Sed  files would be deleted.
139194612Sed
140194612Sed* Don't run out of file handles on test/decompression when
141194612Sed  large numbers of files have invalid magic numbers.
142195098Sed
143195098Sed* Avoid library namespace pollution.  Prefix all exported 
144195098Sed  symbols with BZ2_.
145195098Sed
146195098Sed* Minor sorting enhancements from my DCC2000 paper.
147195098Sed
148195098Sed* Advance the version number to 1.0, so as to counteract the
149194612Sed  (false-in-this-case) impression some people have that programs 
150194612Sed  with version numbers less than 1.0 are in some way, experimental,
151194612Sed  pre-release versions.
152194612Sed
153194612Sed* Create an initial Makefile-libbz2_so to build a shared library.
154194612Sed  Yes, I know I should really use libtool et al ...
155194612Sed
156194612Sed* Make the program exit with 2 instead of 0 when decompression
157194612Sed  fails due to a bad magic number (ie, an invalid bzip2 header).
158194612Sed  Also exit with 1 (as the manual claims :-) whenever a diagnostic
159194612Sed  message would have been printed AND the corresponding operation 
160194612Sed  is aborted, for example
161194612Sed     bzip2: Output file xx already exists.
162194612Sed  When a diagnostic message is printed but the operation is not 
163194612Sed  aborted, for example
164194612Sed     bzip2: Can't guess original name for wurble -- using wurble.out
165194612Sed  then the exit value 0 is returned, unless some other problem is
166194612Sed  also detected.
167194612Sed
168194612Sed  I think it corresponds more closely to what the manual claims now.
169194612Sed
170194612Sed
1711.0.1
172~~~~~
173* Modified dlltest.c so it uses the new BZ2_ naming scheme.
174* Modified makefile-msc to fix minor build probs on Win2k.
175* Updated README.COMPILATION.PROBLEMS.
176
177There are no functionality changes or bug fixes relative to version
1781.0.0.  This is just a documentation update + a fix for minor Win32
179build problems.  For almost everyone, upgrading from 1.0.0 to 1.0.1 is
180utterly pointless.  Don't bother.
181
182
1831.0.2
184~~~~~
185A bug fix release, addressing various minor issues which have appeared
186in the 18 or so months since 1.0.1 was released.  Most of the fixes
187are to do with file-handling or documentation bugs.  To the best of my
188knowledge, there have been no data-loss-causing bugs reported in the
189compression/decompression engine of 1.0.0 or 1.0.1.
190
191Note that this release does not improve the rather crude build system
192for Unix platforms.  The general plan here is to autoconfiscate/
193libtoolise 1.0.2 soon after release, and release the result as 1.1.0
194or perhaps 1.2.0.  That, however, is still just a plan at this point.
195
196Here are the changes in 1.0.2.  Bug-reporters and/or patch-senders in
197parentheses.
198
199* Fix an infinite segfault loop in 1.0.1 when a directory is
200  encountered in -f (force) mode.
201     (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt)
202
203* Avoid double fclose() of output file on certain I/O error paths.
204     (Solar Designer)
205
206* Don't fail with internal error 1007 when fed a long stream (> 48MB)
207  of byte 251.  Also print useful message suggesting that 1007s may be
208  caused by bad memory.
209     (noticed by Juan Pedro Vallejo, fixed by me)
210
211* Fix uninitialised variable silly bug in demo prog dlltest.c.
212     (Jorj Bauer)
213
214* Remove 512-MB limitation on recovered file size for bzip2recover
215  on selected platforms which support 64-bit ints.  At the moment
216  all GCC supported platforms, and Win32.
217     (me, Alson van der Meulen)
218
219* Hard-code header byte values, to give correct operation on platforms
220  using EBCDIC as their native character set (IBM's OS/390).
221     (Leland Lucius)
222
223* Copy file access times correctly.
224     (Marty Leisner)
225
226* Add distclean and check targets to Makefile.
227     (Michael Carmack)
228
229* Parameterise use of ar and ranlib in Makefile.  Also add $(LDFLAGS).
230     (Rich Ireland, Bo Thorsen)
231
232* Pass -p (create parent dirs as needed) to mkdir during make install.
233     (Jeremy Fusco)
234
235* Dereference symlinks when copying file permissions in -f mode.
236     (Volker Schmidt)
237
238* Majorly simplify implementation of uInt64_qrm10.
239     (Bo Lindbergh)
240
241* Check the input file still exists before deleting the output one,
242  when aborting in cleanUpAndFail().
243     (Joerg Prante, Robert Linden, Matthias Krings)
244
245Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer
246of bzip2:
247
248* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore.
249
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