summaryrefslogtreecommitdiff
path: root/bzlib.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-13Prepare for 1.0.8 release.bzip2-1.0.8Mark Wielaard1-2/+2
2019-07-13prepare-release.sh: Fix bz-lifespan typo.Mark Wielaard1-1/+1
2019-07-12manual: Add id to legalnotice.Mark Wielaard1-1/+1
Otherwise the generated HTML will have a different randomly generated name id which generates spurious diffs.
2019-07-12Fix bzgrep so it doesn't always return a 0 exit code with multiple archivesMark Wielaard1-2/+14
The bzgrep wrapper always returns 0 as exit code when working on multiple archives, even when the pattern is not found. Fix from openSUSE by Kristýna Streitová <kstreitova@suse.com> https://bugzilla.suse.com/970260
2019-07-12Fix bashism in bzgrepMark Wielaard1-3/+1
bzgrep uses ${var//} which is a bashism. Replace by calling sed so other POSIX shells work. Patch from openSUSE by Led <ledest@gmail.com>
2019-07-11fix bzdiff when TMPDIR contains spacesMark Wielaard1-8/+8
The bzdiff script doesn't contain enough quotes, so that it doesn't work if the TMPDIR environment variable is defined and contains spaces. https://bugs.debian.org/493710 Author: Vincent Lefevre <vincent@vinc17.org>
2019-07-11Replace project contact email with bzip2-devel@sourceware.org.Mark Wielaard5-13/+14
Keep Julian's email as author information, but redirect general project feedback in the code and manual to the community mailinglist.
2019-07-11release-update.sh should update version number in website pages too.Mark Wielaard1-0/+4
2019-07-09Accept as many selectors as the file format allows.Mark Wielaard2-3/+9
But ignore any larger than the theoretical maximum, BZ_MAX_SELECTORS. The theoretical maximum number of selectors depends on the maximum blocksize (900000 bytes) and the number of symbols (50) that can be encoded with a different Huffman tree. BZ_MAX_SELECTORS is 18002. But the bzip2 file format allows the number of selectors to be encoded with 15 bits (because 18002 isn't a factor of 2 and doesn't fit in 14 bits). So the file format maximum is 32767 selectors. Some bzip2 encoders might actually have written out more selectors than the theoretical maximum because they rounded up the number of selectors to some convenient factor of 8. The extra 14766 selectors can never be validly used by the decompression algorithm. So we can read them, but then discard them. This is effectively what was done (by accident) before we added a check for nSelectors to be at most BZ_MAX_SELECTORS to mitigate CVE-2019-12900. The extra selectors were written out after the array inside the EState struct. But the struct has extra space allocated after the selector arrays of 18060 bytes (which is larger than 14766). All of which will be initialized later (so the overwrite of that space with extra selector values would have been harmless).
2019-07-09Fix a 'not a normal file' error when compressing large files.Phil Ross1-2/+2
The bzip2 command line would report 'not a normal file' for files of size larger than 2^32 - 1 bytes. Patch bzip2.c to use _stati64 instead of _stat so that a successful result is returned for large files. Resolves https://github.com/philr/bzip2-windows/issues/3.
2019-07-05Update prepare-release.sh for Makefile* and date ranges.Mark Wielaard1-6/+8
Also update the version number in the Makefile comments. And update any date ranges to include the current year.
2019-07-05Fix include path separatorJoshua Watt1-1/+1
Changes the include path separator for Windows builds to use "/" instead of "\". Windows has no problems with using a forward slash as a path separator, but using a backslash causes problems when attempting to cross compile for other platforms (for example, when trying to cross compile for MinGW from Linux).