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