diff options
author | dvorkanton <dvorkanton@yandex-team.ru> | 2022-02-10 16:46:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:04 +0300 |
commit | ce1ca0f8ad5b8231d32b35629f85bb09beea1bfb (patch) | |
tree | 19b21fdcf9ef01e0c94a15434fb08a4a555a79e9 /contrib/libs/libbz2 | |
parent | fc361854fd6ee8d747229b090f0b8018e260d1fb (diff) | |
download | ydb-ce1ca0f8ad5b8231d32b35629f85bb09beea1bfb.tar.gz |
Restoring authorship annotation for <dvorkanton@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libbz2')
-rw-r--r-- | contrib/libs/libbz2/CHANGES | 712 | ||||
-rw-r--r-- | contrib/libs/libbz2/LICENSE | 6 | ||||
-rw-r--r-- | contrib/libs/libbz2/README | 20 | ||||
-rw-r--r-- | contrib/libs/libbz2/README.COMPILATION.PROBLEMS | 116 | ||||
-rw-r--r-- | contrib/libs/libbz2/README.XML.STUFF | 4 | ||||
-rw-r--r-- | contrib/libs/libbz2/blocksort.c | 10 | ||||
-rw-r--r-- | contrib/libs/libbz2/bzlib.c | 8 | ||||
-rw-r--r-- | contrib/libs/libbz2/bzlib.h | 4 | ||||
-rw-r--r-- | contrib/libs/libbz2/bzlib_private.h | 6 | ||||
-rw-r--r-- | contrib/libs/libbz2/compress.c | 6 | ||||
-rw-r--r-- | contrib/libs/libbz2/crctable.c | 4 | ||||
-rw-r--r-- | contrib/libs/libbz2/decompress.c | 22 | ||||
-rw-r--r-- | contrib/libs/libbz2/huffman.c | 4 | ||||
-rw-r--r-- | contrib/libs/libbz2/randtable.c | 4 | ||||
-rw-r--r-- | contrib/libs/libbz2/ya.make | 2 |
15 files changed, 464 insertions, 464 deletions
diff --git a/contrib/libs/libbz2/CHANGES b/contrib/libs/libbz2/CHANGES index 30afead258..3e9314b55a 100644 --- a/contrib/libs/libbz2/CHANGES +++ b/contrib/libs/libbz2/CHANGES @@ -1,356 +1,356 @@ - ------------------------------------------------------------------ - This file is part of bzip2/libbzip2, a program and library for - lossless, block-sorting data compression. - - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - - Please read the WARNING, DISCLAIMER and PATENTS sections in the - README file. - - This program is released under the terms of the license contained - in the file LICENSE. - ------------------------------------------------------------------ - - -0.9.0 -~~~~~ -First version. - - -0.9.0a -~~~~~~ -Removed 'ranlib' from Makefile, since most modern Unix-es -don't need it, or even know about it. - - -0.9.0b -~~~~~~ -Fixed a problem with error reporting in bzip2.c. This does not effect -the library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the -program proper) compress and decompress correctly, but give misleading -error messages (internal panics) when an I/O error occurs, instead of -reporting the problem correctly. This shouldn't give any data loss -(as far as I can see), but is confusing. - -Made the inline declarations disappear for non-GCC compilers. - - -0.9.0c -~~~~~~ -Fixed some problems in the library pertaining to some boundary cases. -This makes the library behave more correctly in those situations. The -fixes apply only to features (calls and parameters) not used by -bzip2.c, so the non-fixedness of them in previous versions has no -effect on reliability of bzip2.c. - -In bzlib.c: - * made zero-length BZ_FLUSH work correctly in bzCompress(). - * fixed bzWrite/bzRead to ignore zero-length requests. - * fixed bzread to correctly handle read requests after EOF. - * wrong parameter order in call to bzDecompressInit in - bzBuffToBuffDecompress. Fixed. - -In compress.c: - * changed setting of nGroups in sendMTFValues() so as to - do a bit better on small files. This _does_ effect - bzip2.c. - - -0.9.5a -~~~~~~ -Major change: add a fallback sorting algorithm (blocksort.c) -to give reasonable behaviour even for very repetitive inputs. -Nuked --repetitive-best and --repetitive-fast since they are -no longer useful. - -Minor changes: mostly a whole bunch of small changes/ -bugfixes in the driver (bzip2.c). Changes pertaining to the -user interface are: - - allow decompression of symlink'd files to stdout - decompress/test files even without .bz2 extension - give more accurate error messages for I/O errors - when compressing/decompressing to stdout, don't catch control-C - read flags from BZIP2 and BZIP environment variables - decline to break hard links to a file unless forced with -f - allow -c flag even with no filenames - preserve file ownerships as far as possible - make -s -1 give the expected block size (100k) - add a flag -q --quiet to suppress nonessential warnings - stop decoding flags after --, so files beginning in - can be handled - resolved inconsistent naming: bzcat or bz2cat ? - bzip2 --help now returns 0 - -Programming-level changes are: - - fixed syntax error in GET_LL4 for Borland C++ 5.02 - let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} - fix overshoot of mode-string end in bzopen_or_bzdopen - wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } - close file handles under all error conditions - added minor mods so it compiles with DJGPP out of the box - fixed Makefile so it doesn't give problems with BSD make - fix uninitialised memory reads in dlltest.c - -0.9.5b -~~~~~~ -Open stdin/stdout in binary mode for DJGPP. - -0.9.5c -~~~~~~ -Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 -version could cause the sorted order to be wrong in some extremely -obscure cases. Also changed setting of quadrant in blocksort.c. - -0.9.5d -~~~~~~ -The only functional change is to make bzlibVersion() in the library -return the correct string. This has no effect whatsoever on the -functioning of the bzip2 program or library. Added a couple of casts -so the library compiles without warnings at level 3 in MS Visual -Studio 6.0. Included a Y2K statement in the file Y2K_INFO. All other -changes are minor documentation changes. - -1.0 -~~~ -Several minor bugfixes and enhancements: - -* Large file support. The library uses 64-bit counters to - count the volume of data passing through it. bzip2.c - is now compiled with -D_FILE_OFFSET_BITS=64 to get large - file support from the C library. -v correctly prints out - file sizes greater than 4 gigabytes. All these changes have - been made without assuming a 64-bit platform or a C compiler - which supports 64-bit ints, so, except for the C library - aspect, they are fully portable. - -* Decompression robustness. The library/program should be - robust to any corruption of compressed data, detecting and - handling _all_ corruption, instead of merely relying on - the CRCs. What this means is that the program should - never crash, given corrupted data, and the library should - always return BZ_DATA_ERROR. - -* Fixed an obscure race-condition bug only ever observed on - Solaris, in which, if you were very unlucky and issued - control-C at exactly the wrong time, both input and output - files would be deleted. - -* Don't run out of file handles on test/decompression when - large numbers of files have invalid magic numbers. - -* Avoid library namespace pollution. Prefix all exported - symbols with BZ2_. - -* Minor sorting enhancements from my DCC2000 paper. - -* Advance the version number to 1.0, so as to counteract the - (false-in-this-case) impression some people have that programs - with version numbers less than 1.0 are in some way, experimental, - pre-release versions. - -* Create an initial Makefile-libbz2_so to build a shared library. - Yes, I know I should really use libtool et al ... - -* Make the program exit with 2 instead of 0 when decompression - fails due to a bad magic number (ie, an invalid bzip2 header). - Also exit with 1 (as the manual claims :-) whenever a diagnostic - message would have been printed AND the corresponding operation - is aborted, for example - bzip2: Output file xx already exists. - When a diagnostic message is printed but the operation is not - aborted, for example - bzip2: Can't guess original name for wurble -- using wurble.out - then the exit value 0 is returned, unless some other problem is - also detected. - - I think it corresponds more closely to what the manual claims now. - - -1.0.1 -~~~~~ -* Modified dlltest.c so it uses the new BZ2_ naming scheme. -* Modified makefile-msc to fix minor build probs on Win2k. -* Updated README.COMPILATION.PROBLEMS. - -There are no functionality changes or bug fixes relative to version -1.0.0. This is just a documentation update + a fix for minor Win32 -build problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is -utterly pointless. Don't bother. - - -1.0.2 -~~~~~ -A bug fix release, addressing various minor issues which have appeared -in the 18 or so months since 1.0.1 was released. Most of the fixes -are to do with file-handling or documentation bugs. To the best of my -knowledge, there have been no data-loss-causing bugs reported in the -compression/decompression engine of 1.0.0 or 1.0.1. - -Note that this release does not improve the rather crude build system -for Unix platforms. The general plan here is to autoconfiscate/ -libtoolise 1.0.2 soon after release, and release the result as 1.1.0 -or perhaps 1.2.0. That, however, is still just a plan at this point. - -Here are the changes in 1.0.2. Bug-reporters and/or patch-senders in -parentheses. - -* Fix an infinite segfault loop in 1.0.1 when a directory is - encountered in -f (force) mode. - (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) - -* Avoid double fclose() of output file on certain I/O error paths. - (Solar Designer) - -* Don't fail with internal error 1007 when fed a long stream (> 48MB) - of byte 251. Also print useful message suggesting that 1007s may be - caused by bad memory. - (noticed by Juan Pedro Vallejo, fixed by me) - -* Fix uninitialised variable silly bug in demo prog dlltest.c. - (Jorj Bauer) - -* Remove 512-MB limitation on recovered file size for bzip2recover - on selected platforms which support 64-bit ints. At the moment - all GCC supported platforms, and Win32. - (me, Alson van der Meulen) - -* Hard-code header byte values, to give correct operation on platforms - using EBCDIC as their native character set (IBM's OS/390). - (Leland Lucius) - -* Copy file access times correctly. - (Marty Leisner) - -* Add distclean and check targets to Makefile. - (Michael Carmack) - -* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). - (Rich Ireland, Bo Thorsen) - -* Pass -p (create parent dirs as needed) to mkdir during make install. - (Jeremy Fusco) - -* Dereference symlinks when copying file permissions in -f mode. - (Volker Schmidt) - -* Majorly simplify implementation of uInt64_qrm10. - (Bo Lindbergh) - -* Check the input file still exists before deleting the output one, - when aborting in cleanUpAndFail(). - (Joerg Prante, Robert Linden, Matthias Krings) - -Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer -of bzip2: - -* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. - -* Spelling changes and minor enhancements in bzip2.1. - -* Avoid race condition between creating the output file and setting its - interim permissions safely, by using fopen_output_safely(). - No changes to bzip2recover since there is no issue with file - permissions there. - -* do not print senseless report with -v when compressing an empty - file. - -* bzcat -f works on non-bzip2 files. - -* do not try to escape shell meta-characters on unix (the shell takes - care of these). - -* added --fast and --best aliases for -1 -9 for gzip compatibility. - - -1.0.3 (15 Feb 05) -~~~~~~~~~~~~~~~~~ -Fixes some minor bugs since the last version, 1.0.2. - -* Further robustification against corrupted compressed data. - There are currently no known bitstreams which can cause the - decompressor to crash, loop or access memory which does not - belong to it. If you are using bzip2 or the library to - decompress bitstreams from untrusted sources, an upgrade - to 1.0.3 is recommended. This fixes CAN-2005-1260. - -* The documentation has been converted to XML, from which html - and pdf can be derived. - -* Various minor bugs in the documentation have been fixed. - -* Fixes for various compilation warnings with newer versions of - gcc, and on 64-bit platforms. - -* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. - This has been fixed. - - -1.0.4 (20 Dec 06) -~~~~~~~~~~~~~~~~~ -Fixes some minor bugs since the last version, 1.0.3. - -* Fix file permissions race problem (CAN-2005-0953). - -* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD - scan. - -* 'const'/prototype cleanups in the C code. - -* Change default install location to /usr/local, and handle multiple - 'make install's without error. - -* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 - to the extent that applies to bzgrep. - -* Use 'mktemp' rather than 'tempfile' in bzdiff. - -* Tighten up a couple of assertions in blocksort.c following automated - analysis. - -* Fix minor doc/comment bugs. - - -1.0.5 (10 Dec 07) -~~~~~~~~~~~~~~~~~ -Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. - - -1.0.6 (6 Sept 10) -~~~~~~~~~~~~~~~~~ - -* Security fix for CVE-2010-0405. This was reported by Mikolaj - Izdebski. - -* Make the documentation build on Ubuntu 10.04 - -1.0.7 (27 Jun 19) -~~~~~~~~~~~~~~~~~ - -* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH - -* bzip2: Fix return value when combining --test,-t and -q. - -* bzip2recover: Fix buffer overflow for large argv[0] - -* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) - -* Make sure nSelectors is not out of range (CVE-2019-12900) - -1.0.8 (13 Jul 19) -~~~~~~~~~~~~~~~~~ - -* Accept as many selectors as the file format allows. - This relaxes the fix for CVE-2019-12900 from 1.0.7 - so that bzip2 allows decompression of bz2 files that - use (too) many selectors again. - -* Fix handling of large (> 4GB) files on Windows. - -* Cleanup of bzdiff and bzgrep scripts so they don't use - any bash extensions and handle multiple archives correctly. - -* There is now a bz2-files testsuite at - https://sourceware.org/git/bzip2-tests.git + ------------------------------------------------------------------ + This file is part of bzip2/libbzip2, a program and library for + lossless, block-sorting data compression. + + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + + Please read the WARNING, DISCLAIMER and PATENTS sections in the + README file. + + This program is released under the terms of the license contained + in the file LICENSE. + ------------------------------------------------------------------ + + +0.9.0 +~~~~~ +First version. + + +0.9.0a +~~~~~~ +Removed 'ranlib' from Makefile, since most modern Unix-es +don't need it, or even know about it. + + +0.9.0b +~~~~~~ +Fixed a problem with error reporting in bzip2.c. This does not effect +the library in any way. Problem is: versions 0.9.0 and 0.9.0a (of the +program proper) compress and decompress correctly, but give misleading +error messages (internal panics) when an I/O error occurs, instead of +reporting the problem correctly. This shouldn't give any data loss +(as far as I can see), but is confusing. + +Made the inline declarations disappear for non-GCC compilers. + + +0.9.0c +~~~~~~ +Fixed some problems in the library pertaining to some boundary cases. +This makes the library behave more correctly in those situations. The +fixes apply only to features (calls and parameters) not used by +bzip2.c, so the non-fixedness of them in previous versions has no +effect on reliability of bzip2.c. + +In bzlib.c: + * made zero-length BZ_FLUSH work correctly in bzCompress(). + * fixed bzWrite/bzRead to ignore zero-length requests. + * fixed bzread to correctly handle read requests after EOF. + * wrong parameter order in call to bzDecompressInit in + bzBuffToBuffDecompress. Fixed. + +In compress.c: + * changed setting of nGroups in sendMTFValues() so as to + do a bit better on small files. This _does_ effect + bzip2.c. + + +0.9.5a +~~~~~~ +Major change: add a fallback sorting algorithm (blocksort.c) +to give reasonable behaviour even for very repetitive inputs. +Nuked --repetitive-best and --repetitive-fast since they are +no longer useful. + +Minor changes: mostly a whole bunch of small changes/ +bugfixes in the driver (bzip2.c). Changes pertaining to the +user interface are: + + allow decompression of symlink'd files to stdout + decompress/test files even without .bz2 extension + give more accurate error messages for I/O errors + when compressing/decompressing to stdout, don't catch control-C + read flags from BZIP2 and BZIP environment variables + decline to break hard links to a file unless forced with -f + allow -c flag even with no filenames + preserve file ownerships as far as possible + make -s -1 give the expected block size (100k) + add a flag -q --quiet to suppress nonessential warnings + stop decoding flags after --, so files beginning in - can be handled + resolved inconsistent naming: bzcat or bz2cat ? + bzip2 --help now returns 0 + +Programming-level changes are: + + fixed syntax error in GET_LL4 for Borland C++ 5.02 + let bzBuffToBuffDecompress return BZ_DATA_ERROR{_MAGIC} + fix overshoot of mode-string end in bzopen_or_bzdopen + wrapped bzlib.h in #ifdef __cplusplus ... extern "C" { ... } + close file handles under all error conditions + added minor mods so it compiles with DJGPP out of the box + fixed Makefile so it doesn't give problems with BSD make + fix uninitialised memory reads in dlltest.c + +0.9.5b +~~~~~~ +Open stdin/stdout in binary mode for DJGPP. + +0.9.5c +~~~~~~ +Changed BZ_N_OVERSHOOT to be ... + 2 instead of ... + 1. The + 1 +version could cause the sorted order to be wrong in some extremely +obscure cases. Also changed setting of quadrant in blocksort.c. + +0.9.5d +~~~~~~ +The only functional change is to make bzlibVersion() in the library +return the correct string. This has no effect whatsoever on the +functioning of the bzip2 program or library. Added a couple of casts +so the library compiles without warnings at level 3 in MS Visual +Studio 6.0. Included a Y2K statement in the file Y2K_INFO. All other +changes are minor documentation changes. + +1.0 +~~~ +Several minor bugfixes and enhancements: + +* Large file support. The library uses 64-bit counters to + count the volume of data passing through it. bzip2.c + is now compiled with -D_FILE_OFFSET_BITS=64 to get large + file support from the C library. -v correctly prints out + file sizes greater than 4 gigabytes. All these changes have + been made without assuming a 64-bit platform or a C compiler + which supports 64-bit ints, so, except for the C library + aspect, they are fully portable. + +* Decompression robustness. The library/program should be + robust to any corruption of compressed data, detecting and + handling _all_ corruption, instead of merely relying on + the CRCs. What this means is that the program should + never crash, given corrupted data, and the library should + always return BZ_DATA_ERROR. + +* Fixed an obscure race-condition bug only ever observed on + Solaris, in which, if you were very unlucky and issued + control-C at exactly the wrong time, both input and output + files would be deleted. + +* Don't run out of file handles on test/decompression when + large numbers of files have invalid magic numbers. + +* Avoid library namespace pollution. Prefix all exported + symbols with BZ2_. + +* Minor sorting enhancements from my DCC2000 paper. + +* Advance the version number to 1.0, so as to counteract the + (false-in-this-case) impression some people have that programs + with version numbers less than 1.0 are in some way, experimental, + pre-release versions. + +* Create an initial Makefile-libbz2_so to build a shared library. + Yes, I know I should really use libtool et al ... + +* Make the program exit with 2 instead of 0 when decompression + fails due to a bad magic number (ie, an invalid bzip2 header). + Also exit with 1 (as the manual claims :-) whenever a diagnostic + message would have been printed AND the corresponding operation + is aborted, for example + bzip2: Output file xx already exists. + When a diagnostic message is printed but the operation is not + aborted, for example + bzip2: Can't guess original name for wurble -- using wurble.out + then the exit value 0 is returned, unless some other problem is + also detected. + + I think it corresponds more closely to what the manual claims now. + + +1.0.1 +~~~~~ +* Modified dlltest.c so it uses the new BZ2_ naming scheme. +* Modified makefile-msc to fix minor build probs on Win2k. +* Updated README.COMPILATION.PROBLEMS. + +There are no functionality changes or bug fixes relative to version +1.0.0. This is just a documentation update + a fix for minor Win32 +build problems. For almost everyone, upgrading from 1.0.0 to 1.0.1 is +utterly pointless. Don't bother. + + +1.0.2 +~~~~~ +A bug fix release, addressing various minor issues which have appeared +in the 18 or so months since 1.0.1 was released. Most of the fixes +are to do with file-handling or documentation bugs. To the best of my +knowledge, there have been no data-loss-causing bugs reported in the +compression/decompression engine of 1.0.0 or 1.0.1. + +Note that this release does not improve the rather crude build system +for Unix platforms. The general plan here is to autoconfiscate/ +libtoolise 1.0.2 soon after release, and release the result as 1.1.0 +or perhaps 1.2.0. That, however, is still just a plan at this point. + +Here are the changes in 1.0.2. Bug-reporters and/or patch-senders in +parentheses. + +* Fix an infinite segfault loop in 1.0.1 when a directory is + encountered in -f (force) mode. + (Trond Eivind Glomsrod, Nicholas Nethercote, Volker Schmidt) + +* Avoid double fclose() of output file on certain I/O error paths. + (Solar Designer) + +* Don't fail with internal error 1007 when fed a long stream (> 48MB) + of byte 251. Also print useful message suggesting that 1007s may be + caused by bad memory. + (noticed by Juan Pedro Vallejo, fixed by me) + +* Fix uninitialised variable silly bug in demo prog dlltest.c. + (Jorj Bauer) + +* Remove 512-MB limitation on recovered file size for bzip2recover + on selected platforms which support 64-bit ints. At the moment + all GCC supported platforms, and Win32. + (me, Alson van der Meulen) + +* Hard-code header byte values, to give correct operation on platforms + using EBCDIC as their native character set (IBM's OS/390). + (Leland Lucius) + +* Copy file access times correctly. + (Marty Leisner) + +* Add distclean and check targets to Makefile. + (Michael Carmack) + +* Parameterise use of ar and ranlib in Makefile. Also add $(LDFLAGS). + (Rich Ireland, Bo Thorsen) + +* Pass -p (create parent dirs as needed) to mkdir during make install. + (Jeremy Fusco) + +* Dereference symlinks when copying file permissions in -f mode. + (Volker Schmidt) + +* Majorly simplify implementation of uInt64_qrm10. + (Bo Lindbergh) + +* Check the input file still exists before deleting the output one, + when aborting in cleanUpAndFail(). + (Joerg Prante, Robert Linden, Matthias Krings) + +Also a bunch of patches courtesy of Philippe Troin, the Debian maintainer +of bzip2: + +* Wrapper scripts (with manpages): bzdiff, bzgrep, bzmore. + +* Spelling changes and minor enhancements in bzip2.1. + +* Avoid race condition between creating the output file and setting its + interim permissions safely, by using fopen_output_safely(). + No changes to bzip2recover since there is no issue with file + permissions there. + +* do not print senseless report with -v when compressing an empty + file. + +* bzcat -f works on non-bzip2 files. + +* do not try to escape shell meta-characters on unix (the shell takes + care of these). + +* added --fast and --best aliases for -1 -9 for gzip compatibility. + + +1.0.3 (15 Feb 05) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.2. + +* Further robustification against corrupted compressed data. + There are currently no known bitstreams which can cause the + decompressor to crash, loop or access memory which does not + belong to it. If you are using bzip2 or the library to + decompress bitstreams from untrusted sources, an upgrade + to 1.0.3 is recommended. This fixes CAN-2005-1260. + +* The documentation has been converted to XML, from which html + and pdf can be derived. + +* Various minor bugs in the documentation have been fixed. + +* Fixes for various compilation warnings with newer versions of + gcc, and on 64-bit platforms. + +* The BZ_NO_STDIO cpp symbol was not properly observed in 1.0.2. + This has been fixed. + + +1.0.4 (20 Dec 06) +~~~~~~~~~~~~~~~~~ +Fixes some minor bugs since the last version, 1.0.3. + +* Fix file permissions race problem (CAN-2005-0953). + +* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD + scan. + +* 'const'/prototype cleanups in the C code. + +* Change default install location to /usr/local, and handle multiple + 'make install's without error. + +* Sanitise file names more carefully in bzgrep. Fixes CAN-2005-0758 + to the extent that applies to bzgrep. + +* Use 'mktemp' rather than 'tempfile' in bzdiff. + +* Tighten up a couple of assertions in blocksort.c following automated + analysis. + +* Fix minor doc/comment bugs. + + +1.0.5 (10 Dec 07) +~~~~~~~~~~~~~~~~~ +Security fix only. Fixes CERT-FI 20469 as it applies to bzip2. + + +1.0.6 (6 Sept 10) +~~~~~~~~~~~~~~~~~ + +* Security fix for CVE-2010-0405. This was reported by Mikolaj + Izdebski. + +* Make the documentation build on Ubuntu 10.04 + +1.0.7 (27 Jun 19) +~~~~~~~~~~~~~~~~~ + +* Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH + +* bzip2: Fix return value when combining --test,-t and -q. + +* bzip2recover: Fix buffer overflow for large argv[0] + +* bzip2recover: Fix use after free issue with outFile (CVE-2016-3189) + +* Make sure nSelectors is not out of range (CVE-2019-12900) + +1.0.8 (13 Jul 19) +~~~~~~~~~~~~~~~~~ + +* Accept as many selectors as the file format allows. + This relaxes the fix for CVE-2019-12900 from 1.0.7 + so that bzip2 allows decompression of bz2 files that + use (too) many selectors again. + +* Fix handling of large (> 4GB) files on Windows. + +* Cleanup of bzdiff and bzgrep scripts so they don't use + any bash extensions and handle multiple archives correctly. + +* There is now a bz2-files testsuite at + https://sourceware.org/git/bzip2-tests.git diff --git a/contrib/libs/libbz2/LICENSE b/contrib/libs/libbz2/LICENSE index 81a37eab7a..5433adcd6f 100644 --- a/contrib/libs/libbz2/LICENSE +++ b/contrib/libs/libbz2/LICENSE @@ -2,7 +2,7 @@ -------------------------------------------------------------------------- This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (C) 1996-2019 Julian R Seward. All +documentation, are copyright (C) 1996-2019 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Julian Seward, jseward@acm.org -bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Julian Seward, jseward@acm.org +bzip2/libbzip2 version 1.0.8 of 13 July 2019 -------------------------------------------------------------------------- diff --git a/contrib/libs/libbz2/README b/contrib/libs/libbz2/README index b9c6099fd1..dbda60fa75 100644 --- a/contrib/libs/libbz2/README +++ b/contrib/libs/libbz2/README @@ -6,8 +6,8 @@ This version is fully compatible with the previous public releases. This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. -bzip2/libbzip2 version 1.0.8 of 13 July 2019 -Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in this file. @@ -73,7 +73,7 @@ HOW TO BUILD -- Windows 95, NT, DOS, Mac, etc. It's difficult for me to support compilation on all these platforms. My approach is to collect binaries for these platforms, and put them -on the master web site (https://sourceware.org/bzip2/). Look there. However +on the master web site (https://sourceware.org/bzip2/). Look there. However (FWIW), bzip2-1.0.X is very standard ANSI C and should compile unmodified with MS Visual C. If you have difficulties building, you might want to read README.COMPILATION.PROBLEMS. @@ -161,22 +161,22 @@ WHAT'S NEW IN 0.9.5 ? * Many small improvements in file and flag handling. * A Y2K statement. -WHAT'S NEW IN 1.0.x ? +WHAT'S NEW IN 1.0.x ? See the CHANGES file. -I hope you find bzip2 useful. Feel free to contact the developers at - bzip2-devel@sourceware.org +I hope you find bzip2 useful. Feel free to contact the developers at + bzip2-devel@sourceware.org if you have any suggestions or queries. Many people mailed me with comments, suggestions and patches after the releases of bzip-0.15, bzip-0.21, and bzip2 versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and 1.0.3, and the changes in bzip2 are largely a result of this feedback. I thank you for your comments. -bzip2's "home" is https://sourceware.org/bzip2/ +bzip2's "home" is https://sourceware.org/bzip2/ Julian Seward -jseward@acm.org +jseward@acm.org Cambridge, UK. 18 July 1996 (version 0.15) @@ -192,5 +192,5 @@ Cambridge, UK. 20 December 2006 (bzip2, version 1.0.4) 10 December 2007 (bzip2, version 1.0.5) 6 Sept 2010 (bzip2, version 1.0.6) -27 June 2019 (bzip2, version 1.0.7) -13 July 2019 (bzip2, version 1.0.8) +27 June 2019 (bzip2, version 1.0.7) +13 July 2019 (bzip2, version 1.0.8) diff --git a/contrib/libs/libbz2/README.COMPILATION.PROBLEMS b/contrib/libs/libbz2/README.COMPILATION.PROBLEMS index fa317a50c8..a42be41aab 100644 --- a/contrib/libs/libbz2/README.COMPILATION.PROBLEMS +++ b/contrib/libs/libbz2/README.COMPILATION.PROBLEMS @@ -1,58 +1,58 @@ ------------------------------------------------------------------- -This file is part of bzip2/libbzip2, a program and library for -lossless, block-sorting data compression. - -bzip2/libbzip2 version 1.0.8 of 13 July 2019 -Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> - -Please read the WARNING, DISCLAIMER and PATENTS sections in the -README file. - -This program is released under the terms of the license contained -in the file LICENSE. ------------------------------------------------------------------- - -bzip2 should compile without problems on the vast majority of -platforms. Using the supplied Makefile, I've built and tested it -myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ -6.0 and nmake, you can build a native Win32 version too. Large file -support seems to work correctly on at least on amd64-linux. - -When I say "large file" I mean a file of size 2,147,483,648 (2^31) -bytes or above. Many older OSs can't handle files above this size, -but many newer ones can. Large files are pretty huge -- most files -you'll encounter are not Large Files. - -Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety -of platforms without difficulty, and I hope this version will continue -in that tradition. However, in order to support large files, I've had -to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This -can cause problems. - -The technique of adding -D_FILE_OFFSET_BITS=64 to get large file -support is, as far as I know, the Recommended Way to get correct large -file support. For more details, see the Large File Support -Specification, published by the Large File Summit, at - - http://ftp.sas.com/standards/large.file - -As a general comment, if you get compilation errors which you think -are related to large file support, try removing the above define from -the Makefile, ie, delete the line - - BIGFILES=-D_FILE_OFFSET_BITS=64 - -from the Makefile, and do 'make clean ; make'. This will give you a -version of bzip2 without large file support, which, for most -applications, is probably not a problem. - -Alternatively, try some of the platform-specific hints listed below. - -You can use the spewG.c program to generate huge files to test bzip2's -large file support, if you are feeling paranoid. Be aware though that -any compilation problems which affect bzip2 will also affect spewG.c, -alas. - -AIX: I have reports that for large file support, you need to specify --D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested -this myself. +------------------------------------------------------------------ +This file is part of bzip2/libbzip2, a program and library for +lossless, block-sorting data compression. + +bzip2/libbzip2 version 1.0.8 of 13 July 2019 +Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + +Please read the WARNING, DISCLAIMER and PATENTS sections in the +README file. + +This program is released under the terms of the license contained +in the file LICENSE. +------------------------------------------------------------------ + +bzip2 should compile without problems on the vast majority of +platforms. Using the supplied Makefile, I've built and tested it +myself for x86-linux and amd64-linux. With makefile.msc, Visual C++ +6.0 and nmake, you can build a native Win32 version too. Large file +support seems to work correctly on at least on amd64-linux. + +When I say "large file" I mean a file of size 2,147,483,648 (2^31) +bytes or above. Many older OSs can't handle files above this size, +but many newer ones can. Large files are pretty huge -- most files +you'll encounter are not Large Files. + +Early versions of bzip2 (0.1, 0.9.0, 0.9.5) compiled on a wide variety +of platforms without difficulty, and I hope this version will continue +in that tradition. However, in order to support large files, I've had +to include the define -D_FILE_OFFSET_BITS=64 in the Makefile. This +can cause problems. + +The technique of adding -D_FILE_OFFSET_BITS=64 to get large file +support is, as far as I know, the Recommended Way to get correct large +file support. For more details, see the Large File Support +Specification, published by the Large File Summit, at + + http://ftp.sas.com/standards/large.file + +As a general comment, if you get compilation errors which you think +are related to large file support, try removing the above define from +the Makefile, ie, delete the line + + BIGFILES=-D_FILE_OFFSET_BITS=64 + +from the Makefile, and do 'make clean ; make'. This will give you a +version of bzip2 without large file support, which, for most +applications, is probably not a problem. + +Alternatively, try some of the platform-specific hints listed below. + +You can use the spewG.c program to generate huge files to test bzip2's +large file support, if you are feeling paranoid. Be aware though that +any compilation problems which affect bzip2 will also affect spewG.c, +alas. + +AIX: I have reports that for large file support, you need to specify +-D_LARGE_FILES rather than -D_FILE_OFFSET_BITS=64. I have not tested +this myself. diff --git a/contrib/libs/libbz2/README.XML.STUFF b/contrib/libs/libbz2/README.XML.STUFF index 1503476ebe..b0087b9ee8 100644 --- a/contrib/libs/libbz2/README.XML.STUFF +++ b/contrib/libs/libbz2/README.XML.STUFF @@ -2,8 +2,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/contrib/libs/libbz2/blocksort.c b/contrib/libs/libbz2/blocksort.c index 92d81fe287..ee39564b42 100644 --- a/contrib/libs/libbz2/blocksort.c +++ b/contrib/libs/libbz2/blocksort.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap, bhtab [ 0 .. 2+(nblock/32) ] destroyed */ -#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) -#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) -#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) +#define SET_BH(zz) bhtab[(zz) >> 5] |= ((UInt32)1 << ((zz) & 31)) +#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~((UInt32)1 << ((zz) & 31)) +#define ISSET_BH(zz) (bhtab[(zz) >> 5] & ((UInt32)1 << ((zz) & 31))) #define WORD_BH(zz) bhtab[(zz) >> 5] #define UNALIGNED_BH(zz) ((zz) & 0x01f) diff --git a/contrib/libs/libbz2/bzlib.c b/contrib/libs/libbz2/bzlib.c index 21786551b6..cb39531f91 100644 --- a/contrib/libs/libbz2/bzlib.c +++ b/contrib/libs/libbz2/bzlib.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -43,12 +43,12 @@ void BZ2_bz__AssertH__fail ( int errcode ) fprintf(stderr, "\n\nbzip2/libbzip2: internal error number %d.\n" "This is a bug in bzip2/libbzip2, %s.\n" - "Please report it to: bzip2-devel@sourceware.org. If this happened\n" + "Please report it to: bzip2-devel@sourceware.org. If this happened\n" "when you were using some program which uses libbzip2 as a\n" "component, you should also report this bug to the author(s)\n" "of that program. Please make an effort to report this bug;\n" "timely and accurate bug reports eventually lead to higher\n" - "quality software. Thanks.\n\n", + "quality software. Thanks.\n\n", errcode, BZ2_bzlibVersion() ); diff --git a/contrib/libs/libbz2/bzlib.h b/contrib/libs/libbz2/bzlib.h index a7d2cd6188..ef817380ef 100644 --- a/contrib/libs/libbz2/bzlib.h +++ b/contrib/libs/libbz2/bzlib.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/contrib/libs/libbz2/bzlib_private.h b/contrib/libs/libbz2/bzlib_private.h index 2578c2dcf2..c00ef202c6 100644 --- a/contrib/libs/libbz2/bzlib_private.h +++ b/contrib/libs/libbz2/bzlib_private.h @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -36,7 +36,7 @@ /*-- General stuff. --*/ -#define BZ_VERSION "1.0.8, 13-Jul-2019" +#define BZ_VERSION "1.0.8, 13-Jul-2019" typedef char Char; typedef unsigned char Bool; diff --git a/contrib/libs/libbz2/compress.c b/contrib/libs/libbz2/compress.c index 5dfa00231b..123a33eb9e 100644 --- a/contrib/libs/libbz2/compress.c +++ b/contrib/libs/libbz2/compress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -454,7 +454,7 @@ void sendMTFValues ( EState* s ) AssertH( nGroups < 8, 3002 ); AssertH( nSelectors < 32768 && - nSelectors <= BZ_MAX_SELECTORS, + nSelectors <= BZ_MAX_SELECTORS, 3003 ); diff --git a/contrib/libs/libbz2/crctable.c b/contrib/libs/libbz2/crctable.c index a9212dbf2c..a14124c74c 100644 --- a/contrib/libs/libbz2/crctable.c +++ b/contrib/libs/libbz2/crctable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/contrib/libs/libbz2/decompress.c b/contrib/libs/libbz2/decompress.c index a1a0bac892..c0b39c7363 100644 --- a/contrib/libs/libbz2/decompress.c +++ b/contrib/libs/libbz2/decompress.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. @@ -285,9 +285,9 @@ Int32 BZ2_decompress ( DState* s ) /*--- Now the selectors ---*/ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3); - if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); + if (nGroups < 2 || nGroups > BZ_N_GROUPS) RETURN(BZ_DATA_ERROR); GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15); - if (nSelectors < 1) RETURN(BZ_DATA_ERROR); + if (nSelectors < 1) RETURN(BZ_DATA_ERROR); for (i = 0; i < nSelectors; i++) { j = 0; while (True) { @@ -296,14 +296,14 @@ Int32 BZ2_decompress ( DState* s ) j++; if (j >= nGroups) RETURN(BZ_DATA_ERROR); } - /* Having more than BZ_MAX_SELECTORS doesn't make much sense - since they will never be used, but some implementations might - "round up" the number of selectors, so just ignore those. */ - if (i < BZ_MAX_SELECTORS) - s->selectorMtf[i] = j; + /* Having more than BZ_MAX_SELECTORS doesn't make much sense + since they will never be used, but some implementations might + "round up" the number of selectors, so just ignore those. */ + if (i < BZ_MAX_SELECTORS) + s->selectorMtf[i] = j; } - if (nSelectors > BZ_MAX_SELECTORS) - nSelectors = BZ_MAX_SELECTORS; + if (nSelectors > BZ_MAX_SELECTORS) + nSelectors = BZ_MAX_SELECTORS; /*--- Undo the MTF values for the selectors. ---*/ { diff --git a/contrib/libs/libbz2/huffman.c b/contrib/libs/libbz2/huffman.c index 43a1899e46..5f7745cb68 100644 --- a/contrib/libs/libbz2/huffman.c +++ b/contrib/libs/libbz2/huffman.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/contrib/libs/libbz2/randtable.c b/contrib/libs/libbz2/randtable.c index 43de39ff68..ff5bc5ecbe 100644 --- a/contrib/libs/libbz2/randtable.c +++ b/contrib/libs/libbz2/randtable.c @@ -8,8 +8,8 @@ This file is part of bzip2/libbzip2, a program and library for lossless, block-sorting data compression. - bzip2/libbzip2 version 1.0.8 of 13 July 2019 - Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> + bzip2/libbzip2 version 1.0.8 of 13 July 2019 + Copyright (C) 1996-2019 Julian Seward <jseward@acm.org> Please read the WARNING, DISCLAIMER and PATENTS sections in the README file. diff --git a/contrib/libs/libbz2/ya.make b/contrib/libs/libbz2/ya.make index 3d5be08322..00e204028e 100644 --- a/contrib/libs/libbz2/ya.make +++ b/contrib/libs/libbz2/ya.make @@ -7,7 +7,7 @@ OWNER( g:cpp-contrib ) -VERSION(1.0.8) +VERSION(1.0.8) ORIGINAL_SOURCE(https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz) |