]> sourceware.org Git - bzip2.git/log
bzip2.git
5 years agoprepare-release.sh: Fix bz-lifespan typo.
Mark Wielaard [Sat, 13 Jul 2019 15:06:25 +0000 (17:06 +0200)]
prepare-release.sh: Fix bz-lifespan typo.

5 years agomanual: Add id to legalnotice.
Mark Wielaard [Thu, 11 Jul 2019 18:05:42 +0000 (20:05 +0200)]
manual: Add id to legalnotice.

Otherwise the generated HTML will have a different randomly generated
name id which generates spurious diffs.

5 years agoFix bzgrep so it doesn't always return a 0 exit code with multiple archives
Mark Wielaard [Thu, 11 Jul 2019 23:06:33 +0000 (01:06 +0200)]
Fix bzgrep so it doesn't always return a 0 exit code with multiple archives

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

5 years agoFix bashism in bzgrep
Mark Wielaard [Thu, 11 Jul 2019 22:50:54 +0000 (00:50 +0200)]
Fix bashism in bzgrep

bzgrep uses ${var//} which is a bashism.
Replace by calling sed so other POSIX shells work.

Patch from openSUSE by Led <ledest@gmail.com>

5 years agofix bzdiff when TMPDIR contains spaces
Mark Wielaard [Thu, 11 Jul 2019 21:24:29 +0000 (23:24 +0200)]
fix bzdiff when TMPDIR contains spaces

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>

5 years agoReplace project contact email with bzip2-devel@sourceware.org.
Mark Wielaard [Thu, 11 Jul 2019 17:54:37 +0000 (19:54 +0200)]
Replace project contact email with bzip2-devel@sourceware.org.

Keep Julian's email as author information, but redirect general
project feedback in the code and manual to the community mailinglist.

5 years agorelease-update.sh should update version number in website pages too.
Mark Wielaard [Thu, 11 Jul 2019 00:40:18 +0000 (02:40 +0200)]
release-update.sh should update version number in website pages too.

5 years agoAccept as many selectors as the file format allows.
Mark Wielaard [Tue, 2 Jul 2019 23:28:11 +0000 (01:28 +0200)]
Accept as many selectors as the file format allows.

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).

5 years agoFix a 'not a normal file' error when compressing large files.
Phil Ross [Tue, 21 May 2019 19:46:14 +0000 (20:46 +0100)]
Fix a 'not a normal file' error when compressing large files.

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.

5 years agoUpdate prepare-release.sh for Makefile* and date ranges.
Mark Wielaard [Wed, 3 Jul 2019 20:22:16 +0000 (22:22 +0200)]
Update prepare-release.sh for Makefile* and date ranges.

Also update the version number in the Makefile comments.
And update any date ranges to include the current year.

5 years agoFix include path separator
Joshua Watt [Tue, 2 Jul 2019 20:05:44 +0000 (15:05 -0500)]
Fix include path separator

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).

5 years agoAlways treat .ref files as binary
Joshua Watt [Tue, 2 Jul 2019 20:06:01 +0000 (15:06 -0500)]
Always treat .ref files as binary

.ref files should always be treated as binary files so that git does not
attempt to convert the line endings if core.autocrlf is set.

5 years agoUpdate .gitignore
Joshua Watt [Tue, 2 Jul 2019 20:05:53 +0000 (15:05 -0500)]
Update .gitignore

Updates the .gitignore file to ignore many build artifacts

5 years agoPrepare for 1.0.7 release. bzip2-1.0.7
Mark Wielaard [Thu, 27 Jun 2019 18:10:07 +0000 (20:10 +0200)]
Prepare for 1.0.7 release.

5 years agoAdd prepare-release.sh script.
Mark Wielaard [Tue, 25 Jun 2019 17:22:37 +0000 (19:22 +0200)]
Add prepare-release.sh script.

Script to run to prepare a new release.
It will update the release number and tell you to update the
CHANGES file and to double check everything looks before doing
the release commit and tagging.

Afterwards you probably want to run release-update.sh to upload
the release and update the website at https://sourceware.org/bzip2/

There are embedded version strings and dates in a couple of places.
To keep the script simple remove some that aren't absolutely necessary.

README now just points to CHANGES.
README.COMPILATION.PROBLEMS only mentions the version once at the top.
bzip2.c only mentions the version once when doing --version.
manual.xml now doesn't have any embedded versions, just uses &bz-version;
everywhere.

5 years agoChange a magic number (6) for a constant (BZ_N_GROUPS).
Federico Mena Quintero [Wed, 29 May 2019 22:14:27 +0000 (17:14 -0500)]
Change a magic number (6) for a constant (BZ_N_GROUPS).

decompress.c (BZ2_decompress): Check nGroups against BZ_N_GROUPS.

5 years agoMake sure nSelectors is not out of range
Albert Astals Cid [Tue, 28 May 2019 17:35:18 +0000 (19:35 +0200)]
Make sure nSelectors is not out of range

nSelectors is used in a loop from 0 to nSelectors to access selectorMtf
which is
UChar    selectorMtf[BZ_MAX_SELECTORS];
so if nSelectors is bigger than BZ_MAX_SELECTORS it'll do an invalid memory
access

Fixes out of bounds access discovered while fuzzying karchive

This was reported as CVE-2019-12900
BZ2_decompress in decompress.c in bzip2 through 1.0.6 has an
out-of-bounds write when there are many selectors.

5 years agoFix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH
Paul Kehrer [Sat, 8 Jun 2019 14:06:40 +0000 (10:06 -0400)]
Fix undefined behavior in the macros SET_BH, CLEAR_BH, & ISSET_BH

These macros contain this pattern:
1 << ((Int32_value) & 31

This causes the undefined behavior sanitizers in clang and gcc to
complain because the shift, while ultimately stored to an unsigned
variable, is done as a signed value. Adding a cast to unsigned for
the int32 value resolves this issue.

5 years agobzip2: Fix return value when combining --test,-t and -q.
Mark Wielaard [Mon, 24 Jun 2019 07:31:16 +0000 (09:31 +0200)]
bzip2: Fix return value when combining --test,-t and -q.

When passing -q to get quiet output --test would not display an error
message, but would also suppress the exit 2 code to indicate the file
was corrupt. Only suppress the error message with -q, not the exit value.

This patch comes from Debian.
"bunzip2 -qt returns 0 for corrupt archives"
https://bugs.debian.org/279025

5 years agobzip2recover: Fix use after free issue with outFile.
Mark Wielaard [Sun, 23 Jun 2019 22:45:32 +0000 (00:45 +0200)]
bzip2recover: Fix use after free issue with outFile.

bzip2recover.c (main): Make sure to set outFile to NULL when done.

This was reported as CVE-2016-3189 and found in multiple distributions.
https://seclists.org/oss-sec/2016/q2/568

Some more analysis can be found in:
https://bugzilla.redhat.com/show_bug.cgi?id=1319648

5 years agobzip2recover: Fix buffer overflow for large argv[0].
Mark Wielaard [Sun, 23 Jun 2019 22:14:02 +0000 (00:14 +0200)]
bzip2recover: Fix buffer overflow for large argv[0].

bzip2recover.c (main) copies argv[0] to a statically sized buffer
without checking whether argv[0] might be too big (> 2000 chars).

This patch comes from Fedora and was originally reported at
https://bugzilla.redhat.com/show_bug.cgi?id=226979

5 years agobzip2.c (testStream): Remove set, but not used nread variable.
Mark Wielaard [Sun, 23 Jun 2019 21:52:03 +0000 (23:52 +0200)]
bzip2.c (testStream): Remove set, but not used nread variable.

Modern GCC warns:

bzip2.c: In function ‘testStream’:
bzip2.c:557:37: warning: variable ‘nread’ set but not used
[-Wunused-but-set-variable]
    Int32   bzerr, bzerr_dummy, ret, nread, streamNo, i;
                                     ^~~~~

GCC is correct. In testStream we don't care about the number of bytes
read by BZ2_bzRead. So just remove the variable and the assignment.

5 years agoAdd release-update.sh script.
Mark Wielaard [Sun, 23 Jun 2019 20:18:58 +0000 (22:18 +0200)]
Add release-update.sh script.

Script to run after a release has been tagged, signed and pushed
to git.  Will do a fresh checkout, verify the git tag, do fresh
build/dist, sign the dist with gpg, create a backup copy in HOME,
upload the tar.gz and sig to sourceware, checkout bzip2-htdocs,
copy over the new changes, manual, etc. and git push that to update
https://sourceware.org/bzip2/

5 years agoUse UTF-8 encoding and include bzip.css as link for HTML manual.
Mark Wielaard [Sun, 23 Jun 2019 00:14:23 +0000 (02:14 +0200)]
Use UTF-8 encoding and include bzip.css as link for HTML manual.

5 years agoAdjust bzip.css images to new https://sourceware.org/bzip2/ location.
Mark Wielaard [Sat, 22 Jun 2019 22:47:20 +0000 (00:47 +0200)]
Adjust bzip.css images to new https://sourceware.org/bzip2/ location.

5 years agoChange all bzip.org URLs to sourceware.org/bzip2
Mark Wielaard [Sat, 30 Mar 2019 22:09:35 +0000 (23:09 +0100)]
Change all bzip.org URLs to sourceware.org/bzip2

5 years agoChange Julian's email address to jseward@acm.org
Mark Wielaard [Sat, 30 Mar 2019 21:56:16 +0000 (22:56 +0100)]
Change Julian's email address to jseward@acm.org

13 years agobzip2-1.0.6 bzip2-1.0.6
Julian Seward [Mon, 6 Sep 2010 20:13:13 +0000 (22:13 +0200)]
bzip2-1.0.6

16 years agobzip2-1.0.5 bzip2-1.0.5
Julian Seward [Mon, 10 Dec 2007 21:13:13 +0000 (22:13 +0100)]
bzip2-1.0.5

17 years agobzip2-1.0.4 bzip2-1.0.4
Julian Seward [Wed, 20 Dec 2006 21:13:13 +0000 (22:13 +0100)]
bzip2-1.0.4

19 years agobzip2-1.0.3 bzip2-1.0.3
Julian Seward [Tue, 15 Feb 2005 21:13:13 +0000 (22:13 +0100)]
bzip2-1.0.3

22 years agobzip2-1.0.2 bzip2-1.0.2
Julian Seward [Sun, 30 Dec 2001 21:13:13 +0000 (22:13 +0100)]
bzip2-1.0.2

24 years agobzip2-1.0.1 bzip2-1.0.1
Julian Seward [Sat, 24 Jun 2000 20:13:13 +0000 (22:13 +0200)]
bzip2-1.0.1

25 years agobzip2-0.9.5d bzip2-0.9.5d
Julian Seward [Sat, 4 Sep 1999 20:13:13 +0000 (22:13 +0200)]
bzip2-0.9.5d

26 years agobzip2-0.9.0c bzip2-0.9.0c
Julian Seward [Sun, 23 Aug 1998 20:13:13 +0000 (22:13 +0200)]
bzip2-0.9.0c

27 years agobzip2-0.1pl2 bzip2-0.1pl2
Julian Seward [Fri, 29 Aug 1997 20:13:13 +0000 (22:13 +0200)]
bzip2-0.1pl2

27 years agobzip2-0.1 bzip2-0.1
Julian Seward [Thu, 7 Aug 1997 20:13:13 +0000 (22:13 +0200)]
bzip2-0.1

This page took 0.036882 seconds and 5 git commands to generate.