summaryrefslogtreecommitdiffstats
path: root/archive
diff options
context:
space:
mode:
authorFlorian Franzmann2019-06-28 22:24:52 +0200
committerFlorian Franzmann2019-06-29 00:23:44 +0200
commitbc5f1b78994323f96f36adbdf02f5582b7422256 (patch)
tree21f350b792d8b06e76b0ae5a1845024efca08bf5 /archive
parent3e201f0f564b362af1b398c3f342191b2885647a (diff)
archive/bzip2: apply patches to update to version 1.0.7, security update
Diffstat (limited to 'archive')
-rwxr-xr-xarchive/bzip2/DETAILS5
-rw-r--r--archive/bzip2/HISTORY5
-rwxr-xr-xarchive/bzip2/INSTALL8
-rwxr-xr-xarchive/bzip2/PRE_BUILD7
-rw-r--r--archive/bzip2/patches/0001-Change-Julian-s-email-address-to-jseward-acm.org.patch454
-rw-r--r--archive/bzip2/patches/0002-Change-all-bzip.org-URLs-to-sourceware.org-bzip2.patch88
-rw-r--r--archive/bzip2/patches/0003-Adjust-bzip.css-images-to-new-https-sourceware.org-b.patch35
-rw-r--r--archive/bzip2/patches/0004-Use-UTF-8-encoding-and-include-bzip.css-as-link-for-.patch36
-rw-r--r--archive/bzip2/patches/0005-Add-release-update.sh-script.patch110
-rw-r--r--archive/bzip2/patches/0006-bzip2.c-testStream-Remove-set-but-not-used-nread-var.patch48
-rw-r--r--archive/bzip2/patches/0007-bzip2recover-Fix-buffer-overflow-for-large-argv-0.patch31
-rw-r--r--archive/bzip2/patches/0008-bzip2recover-Fix-use-after-free-issue-with-outFile.patch31
-rw-r--r--archive/bzip2/patches/0009-bzip2-Fix-return-value-when-combining-test-t-and-q.patch45
-rw-r--r--archive/bzip2/patches/0010-Fix-undefined-behavior-in-the-macros-SET_BH-CLEAR_BH.patch37
-rw-r--r--archive/bzip2/patches/0011-Make-sure-nSelectors-is-not-out-of-range.patch36
-rw-r--r--archive/bzip2/patches/0012-Change-a-magic-number-6-for-a-constant-BZ_N_GROUPS.patch26
-rw-r--r--archive/bzip2/patches/0013-Add-prepare-release.sh-script.patch217
-rw-r--r--archive/bzip2/patches/0014-Prepare-for-1.0.7-release.patch472
18 files changed, 1681 insertions, 10 deletions
diff --git a/archive/bzip2/DETAILS b/archive/bzip2/DETAILS
index 8d876d4a46..ec1e098958 100755
--- a/archive/bzip2/DETAILS
+++ b/archive/bzip2/DETAILS
@@ -1,7 +1,8 @@
SPELL=bzip2
VERSION=1.0.6
- SECURITY_PATCH=2
- PATCHLEVEL=4
+ XVERSION=1.0.7
+ SECURITY_PATCH=3
+ PATCHLEVEL=5
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://www.bzip.org/$VERSION/$SOURCE
diff --git a/archive/bzip2/HISTORY b/archive/bzip2/HISTORY
index 0f8e13530e..0b82a6dd03 100644
--- a/archive/bzip2/HISTORY
+++ b/archive/bzip2/HISTORY
@@ -1,3 +1,8 @@
+2019-06-28 Florian Franzmann <siflfran@hawo.stw.uni-erlangen.de>
+ * INSTALL, DETAILS, PRE_BUILD, patches/*: apply patches that get us to version 1.0.7
+ There doesn't seem to be a tarball for 1.0.7 but it fixes CVE-2019-12900.
+ SECURITY_PATCH++, PATCHLEVEL++
+
2019-01-19 Treeve Jelbert <treeve@sourcemage.org>
* DEPENDS: delete gnupg
diff --git a/archive/bzip2/INSTALL b/archive/bzip2/INSTALL
index 1612b03a8e..38efcb4011 100755
--- a/archive/bzip2/INSTALL
+++ b/archive/bzip2/INSTALL
@@ -6,8 +6,8 @@ else
fi &&
# make -f Makefile-libbz2_so &&
rm -vf ${INSTALL_ROOT}/usr/lib/libbz2.so* &&
-cp libbz2.so.${VERSION} ${INSTALL_ROOT}/usr/lib &&
+cp libbz2.so.${XVERSION} ${INSTALL_ROOT}/usr/lib &&
cd ${INSTALL_ROOT}/usr/lib &&
-ln -sf libbz2.so.${VERSION} libbz2.so &&
-ln -sf libbz2.so.${VERSION} libbz2.so.1 &&
-ln -sf libbz2.so.${VERSION} libbz2.so.1.0
+ln -sf libbz2.so.${XVERSION} libbz2.so &&
+ln -sf libbz2.so.${XVERSION} libbz2.so.1 &&
+ln -sf libbz2.so.${XVERSION} libbz2.so.1.0
diff --git a/archive/bzip2/PRE_BUILD b/archive/bzip2/PRE_BUILD
index 03e0339380..7aa9ca6d44 100755
--- a/archive/bzip2/PRE_BUILD
+++ b/archive/bzip2/PRE_BUILD
@@ -1,5 +1,4 @@
default_pre_build &&
-cd ${SOURCE_DIRECTORY} &&
-sedit "s/1.0.4/1.0.5/g" Makefile &&
-sedit "s/1.0.4/1.0.5/g" Makefile-libbz2_so &&
-sedit "s/1.0.4/1.0.5/g" bzip2.1
+cd ${SOURCE_DIRECTORY} &&
+
+apply_patch_dir patches
diff --git a/archive/bzip2/patches/0001-Change-Julian-s-email-address-to-jseward-acm.org.patch b/archive/bzip2/patches/0001-Change-Julian-s-email-address-to-jseward-acm.org.patch
new file mode 100644
index 0000000000..ff21f0da22
--- /dev/null
+++ b/archive/bzip2/patches/0001-Change-Julian-s-email-address-to-jseward-acm.org.patch
@@ -0,0 +1,454 @@
+From 5b923861db7bdd0560f3ecbc8be6e91e830066eb Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sat, 30 Mar 2019 22:56:16 +0100
+Subject: [PATCH 01/14] Change Julian's email address to jseward@acm.org
+
+---
+ CHANGES | 2 +-
+ LICENSE | 2 +-
+ Makefile | 2 +-
+ Makefile-libbz2_so | 2 +-
+ README | 6 +++---
+ README.COMPILATION.PROBLEMS | 2 +-
+ README.XML.STUFF | 2 +-
+ blocksort.c | 2 +-
+ bzip2.1 | 2 +-
+ bzip2.1.preformatted | 2 +-
+ bzip2.c | 8 ++++----
+ bzip2.txt | 2 +-
+ bzip2recover.c | 2 +-
+ bzlib.c | 4 ++--
+ bzlib.h | 2 +-
+ bzlib_private.h | 2 +-
+ compress.c | 2 +-
+ crctable.c | 2 +-
+ decompress.c | 2 +-
+ entities.xml | 2 +-
+ format.pl | 2 +-
+ huffman.c | 2 +-
+ mk251.c | 2 +-
+ randtable.c | 2 +-
+ spewG.c | 2 +-
+ unzcrash.c | 2 +-
+ words2 | 2 +-
+ xmlproc.sh | 2 +-
+ 28 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 81e97ca..94a9b66 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -3,7 +3,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/LICENSE b/LICENSE
+index cc61417..0a10ee6 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -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@bzip.org
++Julian Seward, jseward@acm.org
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+
+ --------------------------------------------------------------------------
+diff --git a/Makefile b/Makefile
+index 9754ddf..c61f867 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,7 +3,7 @@
+ # lossless, block-sorting data compression.
+ #
+ # bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++# Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ # README file.
+diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
+index e58791b..cff37c2 100644
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -11,7 +11,7 @@
+ # lossless, block-sorting data compression.
+ #
+ # bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++# Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ # README file.
+diff --git a/README b/README
+index 9fb0f63..771205a 100644
+--- a/README
++++ b/README
+@@ -7,7 +7,7 @@ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
+
+@@ -187,7 +187,7 @@ WHAT'S NEW IN 1.0.6 ?
+
+
+ I hope you find bzip2 useful. Feel free to contact me at
+- jseward@bzip.org
++ jseward@acm.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,
+@@ -197,7 +197,7 @@ feedback. I thank you for your comments.
+ bzip2's "home" is http://www.bzip.org/
+
+ Julian Seward
+-jseward@bzip.org
++jseward@acm.org
+ Cambridge, UK.
+
+ 18 July 1996 (version 0.15)
+diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
+index 667d0d6..14ddd1b 100644
+--- a/README.COMPILATION.PROBLEMS
++++ b/README.COMPILATION.PROBLEMS
+@@ -3,7 +3,7 @@ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/README.XML.STUFF b/README.XML.STUFF
+index 3a57f3f..f5dc3a4 100644
+--- a/README.XML.STUFF
++++ b/README.XML.STUFF
+@@ -3,7 +3,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/blocksort.c b/blocksort.c
+index d0d662c..830d1b4 100644
+--- a/blocksort.c
++++ b/blocksort.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/bzip2.1 b/bzip2.1
+index ce3a78e..d71c9b2 100644
+--- a/bzip2.1
++++ b/bzip2.1
+@@ -427,7 +427,7 @@ with MaybeUInt64 set to be an unsigned 64-bit integer.
+
+
+ .SH AUTHOR
+-Julian Seward, jsewardbzip.org.
++Julian Seward, jseward@acm.org.
+
+ http://www.bzip.org
+
+diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted
+index 63c33be..da67b66 100644
+--- a/bzip2.1.preformatted
++++ b/bzip2.1.preformatted
+@@ -372,7 +372,7 @@ CCAAVVEEAATTSS
+
+
+ AAUUTTHHOORR
+- Julian Seward, jsewardbzip.org.
++ Julian Seward, jseward@acm.org.
+
+ http://www.bzip.org
+
+diff --git a/bzip2.c b/bzip2.c
+index 6de9d1d..59f59ff 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -8,7 +8,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+@@ -749,7 +749,7 @@ void panic ( const Char* s )
+ "\n%s: PANIC -- internal consistency error:\n"
+ "\t%s\n"
+ "\tThis is a BUG. Please report it to me at:\n"
+- "\tjseward@bzip.org\n",
++ "\tjseward@acm.org\n",
+ progName, s );
+ showFileNames();
+ cleanUpAndFail( 3 );
+@@ -829,7 +829,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
+ " The user's manual, Section 4.3, has more info on (1) and (2).\n"
+ " \n"
+ " If you suspect this is a bug in bzip2, or are unsure about (1)\n"
+- " or (2), feel free to report it to me at: jseward@bzip.org.\n"
++ " or (2), feel free to report it to me at: jseward@acm.org.\n"
+ " Section 4.3 of the user's manual describes the info a useful\n"
+ " bug report should have. If the manual is available on your\n"
+ " system, please try and read it before mailing me. If you don't\n"
+@@ -852,7 +852,7 @@ void mySIGSEGVorSIGBUScatcher ( IntNative n )
+ " The user's manual, Section 4.3, has more info on (2) and (3).\n"
+ " \n"
+ " If you suspect this is a bug in bzip2, or are unsure about (2)\n"
+- " or (3), feel free to report it to me at: jseward@bzip.org.\n"
++ " or (3), feel free to report it to me at: jseward@acm.org.\n"
+ " Section 4.3 of the user's manual describes the info a useful\n"
+ " bug report should have. If the manual is available on your\n"
+ " system, please try and read it before mailing me. If you don't\n"
+diff --git a/bzip2.txt b/bzip2.txt
+index d2deb39..3122c31 100644
+--- a/bzip2.txt
++++ b/bzip2.txt
+@@ -367,7 +367,7 @@ CAVEATS
+
+
+ AUTHOR
+- Julian Seward, jsewardbzip.org.
++ Julian Seward, jseward@acm.org
+
+ http://www.bzip.org
+
+diff --git a/bzip2recover.c b/bzip2recover.c
+index f9de049..06ac1f5 100644
+--- a/bzip2recover.c
++++ b/bzip2recover.c
+@@ -8,7 +8,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/bzlib.c b/bzlib.c
+index bd358a7..8aa6ae7 100644
+--- a/bzlib.c
++++ b/bzlib.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+@@ -43,7 +43,7 @@ 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 me at: jseward@bzip.org. If this happened\n"
++ "Please report it to me at: jseward@acm.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"
+diff --git a/bzlib.h b/bzlib.h
+index 8277123..c2c4b72 100644
+--- a/bzlib.h
++++ b/bzlib.h
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/bzlib_private.h b/bzlib_private.h
+index 5d0217f..06ee0b4 100644
+--- a/bzlib_private.h
++++ b/bzlib_private.h
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/compress.c b/compress.c
+index caf7696..5d4af91 100644
+--- a/compress.c
++++ b/compress.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/crctable.c b/crctable.c
+index 1fea7e9..8daae06 100644
+--- a/crctable.c
++++ b/crctable.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/decompress.c b/decompress.c
+index 311f566..ab6a624 100644
+--- a/decompress.c
++++ b/decompress.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/entities.xml b/entities.xml
+index 4b28f34..808a96a 100644
+--- a/entities.xml
++++ b/entities.xml
+@@ -1,6 +1,6 @@
+ <!-- misc. strings -->
+ <!ENTITY bz-url "http://www.bzip.org">
+-<!ENTITY bz-email "jseward@bzip.org">
++<!ENTITY bz-email "jseward@acm.org">
+ <!ENTITY bz-lifespan "1996-2010">
+
+ <!ENTITY bz-version "1.0.6">
+diff --git a/format.pl b/format.pl
+index f169fd9..0a56cba 100755
+--- a/format.pl
++++ b/format.pl
+@@ -5,7 +5,7 @@
+ # lossless, block-sorting data compression.
+ #
+ # bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++# Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ # README file.
+diff --git a/huffman.c b/huffman.c
+index 2283fdb..fc396be 100644
+--- a/huffman.c
++++ b/huffman.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/mk251.c b/mk251.c
+index c9c36f6..aefd855 100644
+--- a/mk251.c
++++ b/mk251.c
+@@ -10,7 +10,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/randtable.c b/randtable.c
+index 6d62459..35b29e1 100644
+--- a/randtable.c
++++ b/randtable.c
+@@ -9,7 +9,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/spewG.c b/spewG.c
+index 14a3649..08fb3fb 100644
+--- a/spewG.c
++++ b/spewG.c
+@@ -14,7 +14,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/unzcrash.c b/unzcrash.c
+index 7041da5..acdb94d 100644
+--- a/unzcrash.c
++++ b/unzcrash.c
+@@ -18,7 +18,7 @@
+ lossless, block-sorting data compression.
+
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ README file.
+diff --git a/words2 b/words2
+index caddcf4..203ee39 100644
+--- a/words2
++++ b/words2
+@@ -1,5 +1,5 @@
+
+ Checking test results. If any of the four "cmp"s which follow
+ report any differences, something is wrong. If you can't easily
+-figure out what, please let me know (jseward@bzip.org).
++figure out what, please let me know (jseward@acm.org).
+
+diff --git a/xmlproc.sh b/xmlproc.sh
+index ca284ea..c9dc790 100755
+--- a/xmlproc.sh
++++ b/xmlproc.sh
+@@ -6,7 +6,7 @@
+ # lossless, block-sorting data compression.
+ #
+ # bzip2/libbzip2 version 1.0.6 of 6 September 2010
+-# Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
++# Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+ # README file.
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0002-Change-all-bzip.org-URLs-to-sourceware.org-bzip2.patch b/archive/bzip2/patches/0002-Change-all-bzip.org-URLs-to-sourceware.org-bzip2.patch
new file mode 100644
index 0000000000..633de0483f
--- /dev/null
+++ b/archive/bzip2/patches/0002-Change-all-bzip.org-URLs-to-sourceware.org-bzip2.patch
@@ -0,0 +1,88 @@
+From 032a25eee83fd7556cd9e7b1829d56dcc627ddcf Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sat, 30 Mar 2019 23:09:35 +0100
+Subject: [PATCH 02/14] Change all bzip.org URLs to sourceware.org/bzip2
+
+---
+ README | 4 ++--
+ bzip2.1 | 2 +-
+ bzip2.1.preformatted | 2 +-
+ bzip2.txt | 2 +-
+ entities.xml | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/README b/README
+index 771205a..c3bcbeb 100644
+--- a/README
++++ b/README
+@@ -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 (http://www.bzip.org). 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.
+@@ -194,7 +194,7 @@ 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 http://www.bzip.org/
++bzip2's "home" is https://sourceware.org/bzip2/
+
+ Julian Seward
+ jseward@acm.org
+diff --git a/bzip2.1 b/bzip2.1
+index d71c9b2..e386fa3 100644
+--- a/bzip2.1
++++ b/bzip2.1
+@@ -429,7 +429,7 @@ with MaybeUInt64 set to be an unsigned 64-bit integer.
+ .SH AUTHOR
+ Julian Seward, jseward@acm.org.
+
+-http://www.bzip.org
++https://sourceware.org/bzip2/
+
+ The ideas embodied in
+ .I bzip2
+diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted
+index da67b66..5f8e38e 100644
+--- a/bzip2.1.preformatted
++++ b/bzip2.1.preformatted
+@@ -374,7 +374,7 @@ CCAAVVEEAATTSS
+ AAUUTTHHOORR
+ Julian Seward, jseward@acm.org.
+
+- http://www.bzip.org
++ https://sourceware.org/bzip2/
+
+ The ideas embodied in _b_z_i_p_2 are due to (at least) the fol­
+ lowing people: Michael Burrows and David Wheeler (for the
+diff --git a/bzip2.txt b/bzip2.txt
+index 3122c31..0b9f74a 100644
+--- a/bzip2.txt
++++ b/bzip2.txt
+@@ -369,7 +369,7 @@ CAVEATS
+ AUTHOR
+ Julian Seward, jseward@acm.org
+
+- http://www.bzip.org
++ https://sourceware.org/bzip2/
+
+ The ideas embodied in bzip2 are due to (at least) the fol-
+ lowing people: Michael Burrows and David Wheeler (for the
+diff --git a/entities.xml b/entities.xml
+index 808a96a..0ff303e 100644
+--- a/entities.xml
++++ b/entities.xml
+@@ -1,5 +1,5 @@
+ <!-- misc. strings -->
+-<!ENTITY bz-url "http://www.bzip.org">
++<!ENTITY bz-url "https://sourceware.org/bzip2/">
+ <!ENTITY bz-email "jseward@acm.org">
+ <!ENTITY bz-lifespan "1996-2010">
+
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0003-Adjust-bzip.css-images-to-new-https-sourceware.org-b.patch b/archive/bzip2/patches/0003-Adjust-bzip.css-images-to-new-https-sourceware.org-b.patch
new file mode 100644
index 0000000000..45ac9b3c83
--- /dev/null
+++ b/archive/bzip2/patches/0003-Adjust-bzip.css-images-to-new-https-sourceware.org-b.patch
@@ -0,0 +1,35 @@
+From ddd8bae9d51c1b5d04c26be666625d559505fee4 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 23 Jun 2019 00:47:20 +0200
+Subject: [PATCH 03/14] Adjust bzip.css images to new
+ https://sourceware.org/bzip2/ location.
+
+---
+ bzip.css | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bzip.css b/bzip.css
+index 43193d8..2113118 100644
+--- a/bzip.css
++++ b/bzip.css
+@@ -25,7 +25,7 @@ dd {
+ /* -- ruler -- */
+ div.hr_blue {
+ height: 3px;
+- background:#ffffff url("/images/hr_blue.png") repeat-x; }
++ background:#ffffff url("../images/hr_blue.png") repeat-x; }
+ div.hr_blue hr { display:none; }
+
+ /* release styles */
+@@ -38,7 +38,7 @@ div.hr_blue hr { display:none; }
+ ul {
+ margin: 0px 4px 16px 16px;
+ padding: 0px;
+- list-style: url("/images/li-blue.png");
++ list-style: url("../images/li-blue.png");
+ }
+ ul li {
+ margin-bottom: 10px;
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0004-Use-UTF-8-encoding-and-include-bzip.css-as-link-for-.patch b/archive/bzip2/patches/0004-Use-UTF-8-encoding-and-include-bzip.css-as-link-for-.patch
new file mode 100644
index 0000000000..dec7b3fbf1
--- /dev/null
+++ b/archive/bzip2/patches/0004-Use-UTF-8-encoding-and-include-bzip.css-as-link-for-.patch
@@ -0,0 +1,36 @@
+From ac9b3847405574dfd6022c1a9347a4449e8c1510 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 23 Jun 2019 02:14:23 +0200
+Subject: [PATCH 04/14] Use UTF-8 encoding and include bzip.css as link for
+ HTML manual.
+
+---
+ bz-html.xsl | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/bz-html.xsl b/bz-html.xsl
+index 1785fff..b6000d5 100644
+--- a/bz-html.xsl
++++ b/bz-html.xsl
+@@ -7,11 +7,14 @@
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
+ <xsl:import href="bz-common.xsl"/>
+
+-<!-- use 8859-1 encoding -->
+-<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/>
++<!-- use UTF-8 encoding -->
++<xsl:output method="html" encoding="UTF-8" indent="yes"/>
+
+-<!-- we include the css directly when generating one large file -->
+-<xsl:template name="user.head.content">
++<!-- we include the css as link and directly when generating one large file -->
++<xsl:template name="user.head.content">
++ <xsl:text disable-output-escaping="yes">
++<![CDATA[<]]>link rel="stylesheet" type="text/css" href="bzip.css" />
++ </xsl:text>
+ <style type="text/css" media="screen">
+ <xsl:text>&bz-css;</xsl:text>
+ </style>
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0005-Add-release-update.sh-script.patch b/archive/bzip2/patches/0005-Add-release-update.sh-script.patch
new file mode 100644
index 0000000000..5a6d5ccfe6
--- /dev/null
+++ b/archive/bzip2/patches/0005-Add-release-update.sh-script.patch
@@ -0,0 +1,110 @@
+From 32db5b677a55fc32de6588deae2ac27c28728a05 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 23 Jun 2019 22:18:58 +0200
+Subject: [PATCH 05/14] 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/
+---
+ release-update.sh | 85 +++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 85 insertions(+)
+ create mode 100755 release-update.sh
+
+diff --git a/release-update.sh b/release-update.sh
+new file mode 100755
+index 0000000..2ad32ce
+--- /dev/null
++++ b/release-update.sh
+@@ -0,0 +1,85 @@
++#!/bin/bash
++
++# 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/
++
++# Any error is fatal
++set -e
++
++# We take one argument, the version (e.g. 1.0.7)
++if [ $# -ne 1 ]; then
++ echo "$0 <version> (e.g. 1.0.7)"
++ exit 1
++fi
++
++VERSION="$1"
++echo
++echo " === NOTE === "
++echo
++echo "Requires a sourceware account in the bzip2 group."
++echo
++echo "Make sure the git repo was tagged, signed and pushed"
++echo "If not, please double check the source tree is release ready first"
++echo "Then do:"
++echo
++echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
++echo " git push --tags"
++echo
++read -p "Do you want to continue creating/uploading the release (yes/no)? "
++
++if [ "x$REPLY" != "xyes" ]; then
++ echo "OK, till next time."
++ exit
++fi
++
++echo "OK, creating and updating the release."
++
++# Create a temporary directoy and make sure it is cleaned up.
++tempdir=$(mktemp -d) || exit
++trap "rm -rf -- ${tempdir}" EXIT
++
++pushd "${tempdir}"
++
++# Checkout
++git clone git://sourceware.org/git/bzip2.git
++cd bzip2
++git tag --verify "bzip2-${VERSION}"
++git checkout -b "$VERSION" "bzip2-${VERSION}"
++
++# Create dist (creates bzip2-${VERSION}.tar.gz)
++make dist
++
++# Sign (creates bzip2-${VERSION}.tar.gz.sig)
++gpg -b bzip2-${VERSION}.tar.gz
++
++# Create backup copy
++echo "Putting a backup copy in $HOME/bzip2-$VERSION"
++mkdir $HOME/bzip2-$VERSION
++cp bzip2-${VERSION}.tar.gz bzip2-${VERSION}.tar.gz.sig $HOME/bzip2-$VERSION/
++
++# Upload
++scp bzip2-${VERSION}.tar.gz bzip2-${VERSION}.tar.gz.sig \
++ sourceware.org:/sourceware/ftp/pub/bzip2/
++ssh sourceware.org "(cd /sourceware/ftp/pub/bzip2 \
++ && ln -sf bzip2-$VERSION.tar.gz bzip2-latest.tar.gz \
++ && ln -sf bzip2-$VERSION.tar.gz.sig bzip2-latest.tar.gz.sig \
++ && ls -lah bzip2-latest*)"
++
++# Update homepage, manual, etc.
++cd "${tempdir}"
++git clone ssh://sourceware.org/git/bzip2-htdocs.git
++cp bzip2/CHANGES bzip2/bzip.css bzip2-htdocs/
++cp bzip2/bzip.css bzip2/bzip2.txt bzip2/manual.{html,pdf} bzip2-htdocs/manual/
++cd bzip2-htdocs
++git commit -a -m "Update for bzip2 $VERSION release"
++git show
++git push
++
++# Cleanup
++popd
++trap - EXIT
++exit
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0006-bzip2.c-testStream-Remove-set-but-not-used-nread-var.patch b/archive/bzip2/patches/0006-bzip2.c-testStream-Remove-set-but-not-used-nread-var.patch
new file mode 100644
index 0000000000..a35c2ce1f8
--- /dev/null
+++ b/archive/bzip2/patches/0006-bzip2.c-testStream-Remove-set-but-not-used-nread-var.patch
@@ -0,0 +1,48 @@
+From 02fe3ca2349e45eee6dff6ca46bf9a9187f382c5 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Sun, 23 Jun 2019 23:52:03 +0200
+Subject: [PATCH 06/14] bzip2.c (testStream): Remove set, but not used nread
+ variable.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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.
+---
+ bzip2.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bzip2.c b/bzip2.c
+index 59f59ff..854a2bb 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -554,7 +554,7 @@ static
+ Bool testStream ( FILE *zStream )
+ {
+ BZFILE* bzf = NULL;
+- Int32 bzerr, bzerr_dummy, ret, nread, streamNo, i;
++ Int32 bzerr, bzerr_dummy, ret, streamNo, i;
+ UChar obuf[5000];
+ UChar unused[BZ_MAX_UNUSED];
+ Int32 nUnused;
+@@ -577,7 +577,7 @@ Bool testStream ( FILE *zStream )
+ streamNo++;
+
+ while (bzerr == BZ_OK) {
+- nread = BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
++ BZ2_bzRead ( &bzerr, bzf, obuf, 5000 );
+ if (bzerr == BZ_DATA_ERROR_MAGIC) goto errhandler;
+ }
+ if (bzerr != BZ_STREAM_END) goto errhandler;
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0007-bzip2recover-Fix-buffer-overflow-for-large-argv-0.patch b/archive/bzip2/patches/0007-bzip2recover-Fix-buffer-overflow-for-large-argv-0.patch
new file mode 100644
index 0000000000..cc721b0fec
--- /dev/null
+++ b/archive/bzip2/patches/0007-bzip2recover-Fix-buffer-overflow-for-large-argv-0.patch
@@ -0,0 +1,31 @@
+From 833548edc0eb4af85ce8da193835f0f31a6c300f Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Mon, 24 Jun 2019 00:14:02 +0200
+Subject: [PATCH 07/14] 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
+---
+ bzip2recover.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/bzip2recover.c b/bzip2recover.c
+index 06ac1f5..1a70e04 100644
+--- a/bzip2recover.c
++++ b/bzip2recover.c
+@@ -309,7 +309,8 @@ Int32 main ( Int32 argc, Char** argv )
+ UInt32 buffHi, buffLo, blockCRC;
+ Char* p;
+
+- strcpy ( progName, argv[0] );
++ strncpy ( progName, argv[0], BZ_MAX_FILENAME-1);
++ progName[BZ_MAX_FILENAME-1]='\0';
+ inFileName[0] = outFileName[0] = 0;
+
+ fprintf ( stderr,
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0008-bzip2recover-Fix-use-after-free-issue-with-outFile.patch b/archive/bzip2/patches/0008-bzip2recover-Fix-use-after-free-issue-with-outFile.patch
new file mode 100644
index 0000000000..e6a5de2b31
--- /dev/null
+++ b/archive/bzip2/patches/0008-bzip2recover-Fix-use-after-free-issue-with-outFile.patch
@@ -0,0 +1,31 @@
+From c1cdd98db3238cb711c7d9cdc5671452ce2822cb Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Mon, 24 Jun 2019 00:45:32 +0200
+Subject: [PATCH 08/14] 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
+---
+ bzip2recover.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bzip2recover.c b/bzip2recover.c
+index 1a70e04..a955d60 100644
+--- a/bzip2recover.c
++++ b/bzip2recover.c
+@@ -458,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
+ bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
+ bsPutUInt32 ( bsWr, blockCRC );
+ bsClose ( bsWr );
++ outFile = NULL;
+ }
+ if (wrBlock >= rbCtr) break;
+ wrBlock++;
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0009-bzip2-Fix-return-value-when-combining-test-t-and-q.patch b/archive/bzip2/patches/0009-bzip2-Fix-return-value-when-combining-test-t-and-q.patch
new file mode 100644
index 0000000000..2f59191fa9
--- /dev/null
+++ b/archive/bzip2/patches/0009-bzip2-Fix-return-value-when-combining-test-t-and-q.patch
@@ -0,0 +1,45 @@
+From f51f164df0e8a2c0e055174b328b4038a040e547 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Mon, 24 Jun 2019 09:31:16 +0200
+Subject: [PATCH 09/14] 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
+---
+ bzip2.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/bzip2.c b/bzip2.c
+index 854a2bb..63649f6 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -2003,12 +2003,14 @@ IntNative main ( IntNative argc, Char *argv[] )
+ testf ( aa->name );
+ }
+ }
+- if (testFailsExist && noisy) {
+- fprintf ( stderr,
+- "\n"
+- "You can use the `bzip2recover' program to attempt to recover\n"
+- "data from undamaged sections of corrupted files.\n\n"
+- );
++ if (testFailsExist) {
++ if (noisy) {
++ fprintf ( stderr,
++ "\n"
++ "You can use the `bzip2recover' program to attempt to recover\n"
++ "data from undamaged sections of corrupted files.\n\n"
++ );
++ }
+ setExit(2);
+ exit(exitValue);
+ }
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0010-Fix-undefined-behavior-in-the-macros-SET_BH-CLEAR_BH.patch b/archive/bzip2/patches/0010-Fix-undefined-behavior-in-the-macros-SET_BH-CLEAR_BH.patch
new file mode 100644
index 0000000000..589fa0738e
--- /dev/null
+++ b/archive/bzip2/patches/0010-Fix-undefined-behavior-in-the-macros-SET_BH-CLEAR_BH.patch
@@ -0,0 +1,37 @@
+From 16f2c753f9959e8d7c7e1fa771b8ccc5821427aa Mon Sep 17 00:00:00 2001
+From: Paul Kehrer <paul.l.kehrer@gmail.com>
+Date: Sat, 8 Jun 2019 10:06:40 -0400
+Subject: [PATCH 10/14] 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.
+---
+ blocksort.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/blocksort.c b/blocksort.c
+index 830d1b4..aa36766 100644
+--- a/blocksort.c
++++ b/blocksort.c
+@@ -202,9 +202,9 @@ void fallbackQSort3 ( UInt32* fmap,
+ bhtab [ 0 .. 2+(nblock/32) ] destroyed
+ */
+
+-#define SET_BH(zz) bhtab[(zz) >> 5] |= (1 << ((zz) & 31))
+-#define CLEAR_BH(zz) bhtab[(zz) >> 5] &= ~(1 << ((zz) & 31))
+-#define ISSET_BH(zz) (bhtab[(zz) >> 5] & (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)
+
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0011-Make-sure-nSelectors-is-not-out-of-range.patch b/archive/bzip2/patches/0011-Make-sure-nSelectors-is-not-out-of-range.patch
new file mode 100644
index 0000000000..cdc2f324c6
--- /dev/null
+++ b/archive/bzip2/patches/0011-Make-sure-nSelectors-is-not-out-of-range.patch
@@ -0,0 +1,36 @@
+From 7ed62bfb46e87a9e878712603469440e6882b184 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Tue, 28 May 2019 19:35:18 +0200
+Subject: [PATCH 11/14] 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.
+---
+ decompress.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/decompress.c b/decompress.c
+index ab6a624..f3db91d 100644
+--- a/decompress.c
++++ b/decompress.c
+@@ -287,7 +287,7 @@ Int32 BZ2_decompress ( DState* s )
+ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
+ if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
+ GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
+- if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
++ if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
+ for (i = 0; i < nSelectors; i++) {
+ j = 0;
+ while (True) {
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0012-Change-a-magic-number-6-for-a-constant-BZ_N_GROUPS.patch b/archive/bzip2/patches/0012-Change-a-magic-number-6-for-a-constant-BZ_N_GROUPS.patch
new file mode 100644
index 0000000000..c4f8dea54a
--- /dev/null
+++ b/archive/bzip2/patches/0012-Change-a-magic-number-6-for-a-constant-BZ_N_GROUPS.patch
@@ -0,0 +1,26 @@
+From ff986850159a1ea0c75617ffa792d1bb2069856e Mon Sep 17 00:00:00 2001
+From: Federico Mena Quintero <federico@gnome.org>
+Date: Wed, 29 May 2019 17:14:27 -0500
+Subject: [PATCH 12/14] Change a magic number (6) for a constant (BZ_N_GROUPS).
+
+decompress.c (BZ2_decompress): Check nGroups against BZ_N_GROUPS.
+---
+ decompress.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/decompress.c b/decompress.c
+index f3db91d..7351134 100644
+--- a/decompress.c
++++ b/decompress.c
+@@ -285,7 +285,7 @@ Int32 BZ2_decompress ( DState* s )
+
+ /*--- Now the selectors ---*/
+ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
+- if (nGroups < 2 || nGroups > 6) 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 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
+ for (i = 0; i < nSelectors; i++) {
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0013-Add-prepare-release.sh-script.patch b/archive/bzip2/patches/0013-Add-prepare-release.sh-script.patch
new file mode 100644
index 0000000000..c4969ffce3
--- /dev/null
+++ b/archive/bzip2/patches/0013-Add-prepare-release.sh-script.patch
@@ -0,0 +1,217 @@
+From f1e937776c5f331e24cc63a9d8e7ae9445a76761 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Tue, 25 Jun 2019 19:22:37 +0200
+Subject: [PATCH 13/14] 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.
+---
+ README | 23 +----------
+ README.COMPILATION.PROBLEMS | 2 +-
+ bzip2.c | 2 +-
+ manual.xml | 4 +-
+ prepare-release.sh | 80 +++++++++++++++++++++++++++++++++++++
+ release-update.sh | 1 +
+ 6 files changed, 86 insertions(+), 26 deletions(-)
+ create mode 100755 prepare-release.sh
+
+diff --git a/README b/README
+index c3bcbeb..bf95ad7 100644
+--- a/README
++++ b/README
+@@ -161,31 +161,10 @@ WHAT'S NEW IN 0.9.5 ?
+ * Many small improvements in file and flag handling.
+ * A Y2K statement.
+
+-WHAT'S NEW IN 1.0.0 ?
++WHAT'S NEW IN 1.0.x ?
+
+ See the CHANGES file.
+
+-WHAT'S NEW IN 1.0.2 ?
+-
+- See the CHANGES file.
+-
+-WHAT'S NEW IN 1.0.3 ?
+-
+- See the CHANGES file.
+-
+-WHAT'S NEW IN 1.0.4 ?
+-
+- See the CHANGES file.
+-
+-WHAT'S NEW IN 1.0.5 ?
+-
+- See the CHANGES file.
+-
+-WHAT'S NEW IN 1.0.6 ?
+-
+- See the CHANGES file.
+-
+-
+ I hope you find bzip2 useful. Feel free to contact me at
+ jseward@acm.org
+ if you have any suggestions or queries. Many people mailed me with
+diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
+index 14ddd1b..d420854 100644
+--- a/README.COMPILATION.PROBLEMS
++++ b/README.COMPILATION.PROBLEMS
+@@ -12,7 +12,7 @@ This program is released under the terms of the license contained
+ in the file LICENSE.
+ ------------------------------------------------------------------
+
+-bzip2-1.0.6 should compile without problems on the vast majority of
++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
+diff --git a/bzip2.c b/bzip2.c
+index 63649f6..4804e80 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -1609,7 +1609,7 @@ void license ( void )
+ " \n"
+ " This program is free software; you can redistribute it and/or modify\n"
+ " it under the terms set out in the LICENSE file, which is included\n"
+- " in the bzip2-1.0.6 source distribution.\n"
++ " in the bzip2 source distribution.\n"
+ " \n"
+ " This program is distributed in the hope that it will be useful,\n"
+ " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+diff --git a/manual.xml b/manual.xml
+index a7fbcb3..b177bbf 100644
+--- a/manual.xml
++++ b/manual.xml
+@@ -9,7 +9,7 @@
+ <book lang="en" id="userman" xreflabel="bzip2 Manual">
+
+ <bookinfo>
+- <title>bzip2 and libbzip2, version 1.0.6</title>
++ <title>bzip2 and libbzip2, version &bz-version;</title>
+ <subtitle>A program and library for data compression</subtitle>
+ <copyright>
+ <year>&bz-lifespan;</year>
+@@ -139,7 +139,7 @@ else.</para>
+
+ <listitem><para><computeroutput>bzip2</computeroutput>,
+ <computeroutput>bunzip2</computeroutput> - a block-sorting file
+- compressor, v1.0.6</para></listitem>
++ compressor, v&bz-version;</para></listitem>
+
+ <listitem><para><computeroutput>bzcat</computeroutput> -
+ decompresses files to stdout</para></listitem>
+diff --git a/prepare-release.sh b/prepare-release.sh
+new file mode 100755
+index 0000000..db736b7
+--- /dev/null
++++ b/prepare-release.sh
+@@ -0,0 +1,80 @@
++#!/bin/bash
++
++# 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/
++
++# Any error is fatal
++set -e
++
++# We take one argument, the version (e.g. 1.0.7)
++if [ $# -ne 1 ]; then
++ echo "$0 <version> (e.g. 1.0.7)"
++ exit 1
++fi
++
++LANG=C
++VERSION="$1"
++DATE=$(date +"%d %B %Y")
++
++# Replace the version strings in the comments
++VER_PREFIX="bzip2/libbzip2 version "
++sed -i -e "s@${VER_PREFIX}[0-9].*@${VER_PREFIX}${VERSION} of ${DATE}@" \
++ CHANGES LICENSE README* *.c *.h *.pl *.sh
++
++# Add an entry to the README
++DAY=$(date +"%d")
++MONTH=$(date +"%B")
++SHORTMONTH=$(date +"%b")
++YEAR=$(date +"%Y")
++printf "%2s %8s %s\n" "$DAY" "$MONTH" "$YEAR (bzip2, version $VERSION)" \
++ >> README
++
++# Update manual
++sed -i -e "s@ENTITY bz-version \".*\"@ENTITY bz-version \"$VERSION\"@" \
++ -e "s@ENTITY bz-date \".*\"@ENTITY bz-date \"$DAY $MONTH $YEAR\"@" \
++ entities.xml
++
++# bzip2.1 should really be generated from the manual.xml, but currently
++# isn't, so explicitly change it here too.
++sed -i -e "s@This manual page pertains to version .* of@This manual page pertains to version $VERSION of@" \
++ -e "s@sorting file compressor, v.*@sorting file compressor, v$VERSION@" \
++ bzip2.1* bzip2.txt
++
++# Update sources. All sources, use bzlib_private.
++# Except bzip2recover, which embeds a version string...
++sed -i -e "s@^#define BZ_VERSION \".*\"@#define BZ_VERSION \"${VERSION}, ${DAY}-${SHORTMONTH}-${YEAR}\"@" \
++ bzlib_private.h
++sed -i -e "s@\"bzip2recover .*: extracts blocks from damaged@\"bzip2recover ${VERSION}: extracts blocks from damaged@" \
++ bzip2recover.c
++
++# And finally update the version/dist/so_name in the Makefiles.
++sed -i -e "s@^DISTNAME=bzip2-.*@DISTNAME=bzip2-${VERSION}@" \
++ Makefile
++sed -i -e "s@libbz2\.so\.[0-9]\.[0-9]\.[0-9]*@libbz2\.so\.${VERSION}@" \
++ Makefile-libbz2_so
++
++echo "Now make sure the diff looks correct:"
++echo " git diff"
++echo
++echo "And make sure there is a $VERSION section in the CHANGES file."
++echo
++echo "Double check:"
++echo " make clean && make dist && make clean && make -f Makefile-libbz2_so"
++echo
++echo "Does everything look fine?"
++echo
++echo "git commit -a -m \"Prepare for $VERSION release.\""
++echo "git push"
++echo
++echo "Wait for the buildbot to give the all green!"
++echo "Then..."
++echo
++echo "git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
++echo "git push --tags"
++echo
++echo "./release-update.sh"
+diff --git a/release-update.sh b/release-update.sh
+index 2ad32ce..d641ca6 100755
+--- a/release-update.sh
++++ b/release-update.sh
+@@ -24,6 +24,7 @@ echo "Requires a sourceware account in the bzip2 group."
+ echo
+ echo "Make sure the git repo was tagged, signed and pushed"
+ echo "If not, please double check the source tree is release ready first"
++echo "You probably want to run ./prepare-release.sh $VERSION first."
+ echo "Then do:"
+ echo
+ echo " git tag -s -m \"bzip2 $VERSION release\" bzip2-$VERSION"
+--
+2.22.0
+
diff --git a/archive/bzip2/patches/0014-Prepare-for-1.0.7-release.patch b/archive/bzip2/patches/0014-Prepare-for-1.0.7-release.patch
new file mode 100644
index 0000000000..1caac06a9c
--- /dev/null
+++ b/archive/bzip2/patches/0014-Prepare-for-1.0.7-release.patch
@@ -0,0 +1,472 @@
+From f319b98aade2a337c74b9a3b48c6daffb7809cda Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Thu, 27 Jun 2019 20:10:07 +0200
+Subject: [PATCH 14/14] Prepare for 1.0.7 release.
+
+---
+ CHANGES | 15 ++++++++++++++-
+ LICENSE | 2 +-
+ Makefile | 2 +-
+ Makefile-libbz2_so | 10 +++++-----
+ README | 3 ++-
+ README.COMPILATION.PROBLEMS | 2 +-
+ README.XML.STUFF | 2 +-
+ blocksort.c | 2 +-
+ bzip2.1 | 4 ++--
+ bzip2.1.preformatted | 4 ++--
+ bzip2.c | 2 +-
+ bzip2.txt | 4 ++--
+ bzip2recover.c | 4 ++--
+ bzlib.c | 2 +-
+ bzlib.h | 2 +-
+ bzlib_private.h | 4 ++--
+ compress.c | 2 +-
+ crctable.c | 2 +-
+ decompress.c | 2 +-
+ entities.xml | 4 ++--
+ format.pl | 2 +-
+ huffman.c | 2 +-
+ mk251.c | 2 +-
+ randtable.c | 2 +-
+ spewG.c | 2 +-
+ unzcrash.c | 2 +-
+ xmlproc.sh | 2 +-
+ 27 files changed, 51 insertions(+), 37 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 94a9b66..d9b4c05 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -2,7 +2,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+@@ -325,3 +325,16 @@ Security fix only. Fixes CERT-FI 20469 as it applies to bzip2.
+ 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)
+diff --git a/LICENSE b/LICENSE
+index 0a10ee6..95f9598 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -37,6 +37,6 @@ 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.6 of 6 September 2010
++bzip2/libbzip2 version 1.0.7 of 27 June 2019
+
+ --------------------------------------------------------------------------
+diff --git a/Makefile b/Makefile
+index c61f867..6706685 100644
+--- a/Makefile
++++ b/Makefile
+@@ -137,7 +137,7 @@ bzip2recover.o: bzip2recover.c
+ distclean: clean
+ rm -f manual.ps manual.html manual.pdf
+
+-DISTNAME=bzip2-1.0.6
++DISTNAME=bzip2-1.0.7
+ dist: check manual
+ rm -f $(DISTNAME)
+ ln -s -f . $(DISTNAME)
+diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
+index cff37c2..862eb7d 100644
+--- a/Makefile-libbz2_so
++++ b/Makefile-libbz2_so
+@@ -1,6 +1,6 @@
+
+ # This Makefile builds a shared version of the library,
+-# libbz2.so.1.0.6, with soname libbz2.so.1.0,
++# libbz2.so.1.0.7, with soname libbz2.so.1.0,
+ # at least on x86-Linux (RedHat 7.2),
+ # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).
+ # Please see the README file for some important info
+@@ -35,13 +35,13 @@ OBJS= blocksort.o \
+ bzlib.o
+
+ all: $(OBJS)
+- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
++ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
++ $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
+ rm -f libbz2.so.1.0
+- ln -s libbz2.so.1.0.6 libbz2.so.1.0
++ ln -s libbz2.so.1.0.7 libbz2.so.1.0
+
+ clean:
+- rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
++ rm -f $(OBJS) bzip2.o libbz2.so.1.0.7 libbz2.so.1.0 bzip2-shared
+
+ blocksort.o: blocksort.c
+ $(CC) $(CFLAGS) -c blocksort.c
+diff --git a/README b/README
+index bf95ad7..64873f9 100644
+--- a/README
++++ b/README
+@@ -6,7 +6,7 @@ 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.6 of 6 September 2010
++bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
+@@ -192,3 +192,4 @@ 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)
+diff --git a/README.COMPILATION.PROBLEMS b/README.COMPILATION.PROBLEMS
+index d420854..9e6ac5a 100644
+--- a/README.COMPILATION.PROBLEMS
++++ b/README.COMPILATION.PROBLEMS
+@@ -2,7 +2,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+-bzip2/libbzip2 version 1.0.6 of 6 September 2010
++bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/README.XML.STUFF b/README.XML.STUFF
+index f5dc3a4..b0575c3 100644
+--- a/README.XML.STUFF
++++ b/README.XML.STUFF
+@@ -2,7 +2,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/blocksort.c b/blocksort.c
+index aa36766..2657901 100644
+--- a/blocksort.c
++++ b/blocksort.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/bzip2.1 b/bzip2.1
+index e386fa3..f49a78c 100644
+--- a/bzip2.1
++++ b/bzip2.1
+@@ -1,7 +1,7 @@
+ .PU
+ .TH bzip2 1
+ .SH NAME
+-bzip2, bunzip2 \- a block-sorting file compressor, v1.0.6
++bzip2, bunzip2 \- a block-sorting file compressor, v1.0.7
+ .br
+ bzcat \- decompresses files to stdout
+ .br
+@@ -405,7 +405,7 @@ I/O error messages are not as helpful as they could be.
+ tries hard to detect I/O errors and exit cleanly, but the details of
+ what the problem is sometimes seem rather misleading.
+
+-This manual page pertains to version 1.0.6 of
++This manual page pertains to version 1.0.7 of
+ .I bzip2.
+ Compressed data created by this version is entirely forwards and
+ backwards compatible with the previous public releases, versions
+diff --git a/bzip2.1.preformatted b/bzip2.1.preformatted
+index 5f8e38e..a2279ad 100644
+--- a/bzip2.1.preformatted
++++ b/bzip2.1.preformatted
+@@ -3,7 +3,7 @@ bzip2(1) bzip2(1)
+
+
+ NNAAMMEE
+- bzip2, bunzip2 − a block‐sorting file compressor, v1.0.6
++ bzip2, bunzip2 − a block‐sorting file compressor, v1.0.7
+ bzcat − decompresses files to stdout
+ bzip2recover − recovers data from damaged bzip2 files
+
+@@ -348,7 +348,7 @@ CCAAVVEEAATTSS
+ but the details of what the problem is sometimes seem
+ rather misleading.
+
+- This manual page pertains to version 1.0.6 of _b_z_i_p_2_. Com­
++ This manual page pertains to version 1.0.7 of _b_z_i_p_2_. Com­
+ pressed data created by this version is entirely forwards
+ and backwards compatible with the previous public
+ releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
+diff --git a/bzip2.c b/bzip2.c
+index 4804e80..e362c65 100644
+--- a/bzip2.c
++++ b/bzip2.c
+@@ -7,7 +7,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/bzip2.txt b/bzip2.txt
+index 0b9f74a..c449a1a 100644
+--- a/bzip2.txt
++++ b/bzip2.txt
+@@ -1,6 +1,6 @@
+
+ NAME
+- bzip2, bunzip2 - a block-sorting file compressor, v1.0.6
++ bzip2, bunzip2 - a block-sorting file compressor, v1.0.7
+ bzcat - decompresses files to stdout
+ bzip2recover - recovers data from damaged bzip2 files
+
+@@ -345,7 +345,7 @@ CAVEATS
+ but the details of what the problem is sometimes seem
+ rather misleading.
+
+- This manual page pertains to version 1.0.6 of bzip2. Com-
++ This manual page pertains to version 1.0.7 of bzip2. Com-
+ pressed data created by this version is entirely forwards
+ and backwards compatible with the previous public
+ releases, versions 0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1,
+diff --git a/bzip2recover.c b/bzip2recover.c
+index a955d60..c0b9eac 100644
+--- a/bzip2recover.c
++++ b/bzip2recover.c
+@@ -7,7 +7,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+@@ -314,7 +314,7 @@ Int32 main ( Int32 argc, Char** argv )
+ inFileName[0] = outFileName[0] = 0;
+
+ fprintf ( stderr,
+- "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" );
++ "bzip2recover 1.0.7: extracts blocks from damaged .bz2 files.\n" );
+
+ if (argc != 2) {
+ fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
+diff --git a/bzlib.c b/bzlib.c
+index 8aa6ae7..f9da295 100644
+--- a/bzlib.c
++++ b/bzlib.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/bzlib.h b/bzlib.h
+index c2c4b72..8cf0791 100644
+--- a/bzlib.h
++++ b/bzlib.h
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/bzlib_private.h b/bzlib_private.h
+index 06ee0b4..7975552 100644
+--- a/bzlib_private.h
++++ b/bzlib_private.h
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+@@ -36,7 +36,7 @@
+
+ /*-- General stuff. --*/
+
+-#define BZ_VERSION "1.0.6, 6-Sept-2010"
++#define BZ_VERSION "1.0.7, 27-Jun-2019"
+
+ typedef char Char;
+ typedef unsigned char Bool;
+diff --git a/compress.c b/compress.c
+index 5d4af91..237620d 100644
+--- a/compress.c
++++ b/compress.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/crctable.c b/crctable.c
+index 8daae06..746efac 100644
+--- a/crctable.c
++++ b/crctable.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/decompress.c b/decompress.c
+index 7351134..20ce493 100644
+--- a/decompress.c
++++ b/decompress.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/entities.xml b/entities.xml
+index 0ff303e..3016674 100644
+--- a/entities.xml
++++ b/entities.xml
+@@ -3,7 +3,7 @@
+ <!ENTITY bz-email "jseward@acm.org">
+ <!ENTITY bz-lifespan "1996-2010">
+
+-<!ENTITY bz-version "1.0.6">
+-<!ENTITY bz-date "6 September 2010">
++<!ENTITY bz-version "1.0.7">
++<!ENTITY bz-date "27 June 2019">
+
+ <!ENTITY manual-title "bzip2 Manual">
+diff --git a/format.pl b/format.pl
+index 0a56cba..74d7eda 100755
+--- a/format.pl
++++ b/format.pl
+@@ -4,7 +4,7 @@
+ # This file is part of bzip2/libbzip2, a program and library for
+ # lossless, block-sorting data compression.
+ #
+-# bzip2/libbzip2 version 1.0.6 of 6 September 2010
++# bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ # Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/huffman.c b/huffman.c
+index fc396be..0fd6fd7 100644
+--- a/huffman.c
++++ b/huffman.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/mk251.c b/mk251.c
+index aefd855..9528b92 100644
+--- a/mk251.c
++++ b/mk251.c
+@@ -9,7 +9,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/randtable.c b/randtable.c
+index 35b29e1..726d62f 100644
+--- a/randtable.c
++++ b/randtable.c
+@@ -8,7 +8,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/spewG.c b/spewG.c
+index 08fb3fb..320dc85 100644
+--- a/spewG.c
++++ b/spewG.c
+@@ -13,7 +13,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/unzcrash.c b/unzcrash.c
+index acdb94d..6e7c631 100644
+--- a/unzcrash.c
++++ b/unzcrash.c
+@@ -17,7 +17,7 @@
+ This file is part of bzip2/libbzip2, a program and library for
+ lossless, block-sorting data compression.
+
+- bzip2/libbzip2 version 1.0.6 of 6 September 2010
++ bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+
+ Please read the WARNING, DISCLAIMER and PATENTS sections in the
+diff --git a/xmlproc.sh b/xmlproc.sh
+index c9dc790..ea6e7e6 100755
+--- a/xmlproc.sh
++++ b/xmlproc.sh
+@@ -5,7 +5,7 @@
+ # This file is part of bzip2/libbzip2, a program and library for
+ # lossless, block-sorting data compression.
+ #
+-# bzip2/libbzip2 version 1.0.6 of 6 September 2010
++# bzip2/libbzip2 version 1.0.7 of 27 June 2019
+ # Copyright (C) 1996-2010 Julian Seward <jseward@acm.org>
+ #
+ # Please read the WARNING, DISCLAIMER and PATENTS sections in the
+--
+2.22.0
+