Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/bzip2/dist Merge bzip2 1.0.8
details: https://anonhg.NetBSD.org/src/rev/813329dfb5f2
branches: trunk
changeset: 457800:813329dfb5f2
user: maya <maya%NetBSD.org@localhost>
date: Sun Jul 21 11:52:14 2019 +0000
description:
Merge bzip2 1.0.8
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
diffstat:
external/bsd/bzip2/dist/bzip2.1 | 129 ++++++++++++++++++++-----------
external/bsd/bzip2/dist/bzip2.c | 38 ++++----
external/bsd/bzip2/dist/bzip2recover.c | 11 +-
external/bsd/bzip2/dist/bzlib.c | 10 +-
external/bsd/bzip2/dist/bzlib_private.h | 8 +-
external/bsd/bzip2/dist/decompress.c | 16 ++-
6 files changed, 128 insertions(+), 84 deletions(-)
diffs (truncated from 387 to 300 lines):
diff -r c60512fdfc3a -r 813329dfb5f2 external/bsd/bzip2/dist/bzip2.1
--- a/external/bsd/bzip2/dist/bzip2.1 Sun Jul 21 11:36:34 2019 +0000
+++ b/external/bsd/bzip2/dist/bzip2.1 Sun Jul 21 11:52:14 2019 +0000
@@ -1,31 +1,40 @@
-.\" $NetBSD: bzip2.1,v 1.3 2012/05/07 00:45:47 wiz Exp $
+.\" $NetBSD: bzip2.1,v 1.4 2019/07/21 11:52:14 maya Exp $
.\"
-.Dd May 14, 2010
-.Dt BZIP2 1
-.Os
-.Sh NAME
-.Nm bzip2 ,
-.Nm bunzip2 ,
-.Nm bzcat ,
-.Nm bzip2recover
-.Nd block-sorting file compressor
-.Sh SYNOPSIS
-.Nm bzip2
-.Op Fl 123456789cdfkLqstVvz
-.Op Ar filename Ar
-.Pp
-.Nm bunzip2
-.Op Fl fkLVvs
-.Op Ar filename Ar
-.Pp
-.Nm bzcat
-.Op Fl s
-.Op Ar filename Ar
-.Pp
-.Nm bzip2recover
-.Ar filename
-.Sh DESCRIPTION
-.Nm bzip2
+.PU
+.TH bzip2 1
+.SH NAME
+bzip2, bunzip2 \- a block-sorting file compressor, v1.0.8
+.br
+bzcat \- decompresses files to stdout
+.br
+bzip2recover \- recovers data from damaged bzip2 files
+
+.SH SYNOPSIS
+.ll +8
+.B bzip2
+.RB [ " \-cdfkqstvzVL123456789 " ]
+[
+.I "filenames \&..."
+]
+.ll -8
+.br
+.B bunzip2
+.RB [ " \-fkvsVL " ]
+[
+.I "filenames \&..."
+]
+.br
+.B bzcat
+.RB [ " \-s " ]
+[
+.I "filenames \&..."
+]
+.br
+.B bzip2recover
+.I "filename"
+
+.SH DESCRIPTION
+.I bzip2
compresses files using the Burrows-Wheeler block sorting
text compression algorithm, and Huffman coding.
Compression is generally considerably better than that achieved by
@@ -486,25 +495,51 @@
.Nm bzip2
tries hard to detect I/O errors and exit cleanly, but the details of
what the problem is sometimes seem rather misleading.
-.Pp
-This manual page pertains to version 1.0.6 of
-.Nm bzip2 .
+
+This manual page pertains to version 1.0.8 of
+.I bzip2.
Compressed 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, 1.0.2 and above, but with the
-following exception: 0.9.0 and above can correctly decompress multiple
-concatenated compressed files.
-0.1pl2 cannot do this; it will stop after decompressing just the first
-file in the stream.
-.Pp
-.Nm bzip2recover
-versions prior to 1.0.2 used 32-bit integers to represent bit
-positions in compressed files, so they could not handle compressed
-files more than 512 megabytes long.
-Versions 1.0.2 and above use 64-bit ints on some platforms which
-support them (GNU supported targets, and Windows).
-To establish whether or not
-.Nm bzip2recover
-was built with such a limitation, run it without arguments.
-In any event you can build yourself an unlimited version if you can
-recompile it with MaybeUInt64 set to be an unsigned 64-bit integer.
+0.1pl2, 0.9.0, 0.9.5, 1.0.0, 1.0.1, 1.0.2 and above, but with the following
+exception: 0.9.0 and above can correctly decompress multiple
+concatenated compressed files. 0.1pl2 cannot do this; it will stop
+after decompressing just the first file in the stream.
+
+.I bzip2recover
+versions prior to 1.0.2 used 32-bit integers to represent
+bit positions in compressed files, so they could not handle compressed
+files more than 512 megabytes long. Versions 1.0.2 and above use
+64-bit ints on some platforms which support them (GNU supported
+targets, and Windows). To establish whether or not bzip2recover was
+built with such a limitation, run it without arguments. In any event
+you can build yourself an unlimited version if you can recompile it
+with MaybeUInt64 set to be an unsigned 64-bit integer.
+
+
+
+.SH AUTHOR
+Julian Seward, jseward%acm.org@localhost.
+
+https://sourceware.org/bzip2/
+
+The ideas embodied in
+.I bzip2
+are due to (at least) the following
+people: Michael Burrows and David Wheeler (for the block sorting
+transformation), David Wheeler (again, for the Huffman coder), Peter
+Fenwick (for the structured coding model in the original
+.I bzip,
+and many refinements), and Alistair Moffat, Radford Neal and Ian Witten
+(for the arithmetic coder in the original
+.I bzip).
+I am much
+indebted for their help, support and advice. See the manual in the
+source distribution for pointers to sources of documentation. Christian
+von Roques encouraged me to look for faster sorting algorithms, so as to
+speed up compression. Bela Lubkin encouraged me to improve the
+worst-case compression performance.
+Donna Robinson XMLised the documentation.
+The bz* scripts are derived from those of GNU gzip.
+Many people sent patches, helped
+with portability problems, lent machines, gave advice and were generally
+helpful.
diff -r c60512fdfc3a -r 813329dfb5f2 external/bsd/bzip2/dist/bzip2.c
--- a/external/bsd/bzip2/dist/bzip2.c Sun Jul 21 11:36:34 2019 +0000
+++ b/external/bsd/bzip2/dist/bzip2.c Sun Jul 21 11:52:14 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzip2.c,v 1.4 2013/10/20 03:14:21 christos Exp $ */
+/* $NetBSD: bzip2.c,v 1.5 2019/07/21 11:52:14 maya Exp $ */
/*-----------------------------------------------------------*/
@@ -9,8 +9,8 @@
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@localhost>
+ bzip2/libbzip2 version 1.0.8 of 13 July 2019
+ Copyright (C) 1996-2019 Julian Seward <jseward%acm.org@localhost>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -130,12 +130,12 @@
#if BZ_LCCWIN32
# include <io.h>
# include <fcntl.h>
-# include <sys\stat.h>
+# include <sys/stat.h>
# define NORETURN /**/
# define PATH_SEP '\\'
-# define MY_LSTAT _stat
-# define MY_STAT _stat
+# define MY_LSTAT _stati64
+# define MY_STAT _stati64
# define MY_S_ISREG(x) ((x) & _S_IFREG)
# define MY_S_ISDIR(x) ((x) & _S_IFDIR)
@@ -751,8 +751,8 @@
fprintf ( stderr,
"\n%s: PANIC -- internal consistency error:\n"
"\t%s\n"
- "\tThis is a BUG. Please report it to me at:\n"
- "\tjseward%bzip.org@localhost\n",
+ "\tThis is a BUG. Please report it to:\n"
+ "\tbzip2-devel%sourceware.org@localhost\n",
progName, s );
showFileNames();
cleanUpAndFail( 3 );
@@ -833,7 +833,7 @@
" 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@localhost.\n"
+ " or (2), feel free to report it to: bzip2-devel%sourceware.org@localhost.\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"
@@ -856,7 +856,7 @@
" 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@localhost.\n"
+ " or (3), feel free to report it to: bzip2-devel%sourceware.org@localhost.\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"
@@ -1610,11 +1610,11 @@
"bzip2, a block-sorting file compressor. "
"Version %s.\n"
" \n"
- " Copyright (C) 1996-2010 by Julian Seward.\n"
+ " Copyright (C) 1996-2019 by Julian Seward.\n"
" \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"
@@ -2010,12 +2010,14 @@
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);
}
diff -r c60512fdfc3a -r 813329dfb5f2 external/bsd/bzip2/dist/bzip2recover.c
--- a/external/bsd/bzip2/dist/bzip2recover.c Sun Jul 21 11:36:34 2019 +0000
+++ b/external/bsd/bzip2/dist/bzip2recover.c Sun Jul 21 11:52:14 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzip2recover.c,v 1.4 2019/03/06 07:21:55 martin Exp $ */
+/* $NetBSD: bzip2recover.c,v 1.5 2019/07/21 11:52:14 maya Exp $ */
/*-----------------------------------------------------------*/
/*--- Block recoverer program for bzip2 ---*/
@@ -9,8 +9,8 @@
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@localhost>
+ bzip2/libbzip2 version 1.0.8 of 13 July 2019
+ Copyright (C) 1996-2019 Julian Seward <jseward%acm.org@localhost>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -324,11 +324,12 @@
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,
- "bzip2recover 1.0.6: extracts blocks from damaged .bz2 files.\n" );
+ "bzip2recover 1.0.8: extracts blocks from damaged .bz2 files.\n" );
if (argc != 2) {
fprintf ( stderr, "%s: usage is `%s damaged_file_name'.\n",
diff -r c60512fdfc3a -r 813329dfb5f2 external/bsd/bzip2/dist/bzlib.c
--- a/external/bsd/bzip2/dist/bzlib.c Sun Jul 21 11:36:34 2019 +0000
+++ b/external/bsd/bzip2/dist/bzlib.c Sun Jul 21 11:52:14 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bzlib.c,v 1.3 2012/05/07 00:45:47 wiz Exp $ */
+/* $NetBSD: bzlib.c,v 1.4 2019/07/21 11:52:14 maya Exp $ */
/*-------------------------------------------------------------*/
@@ -10,8 +10,8 @@
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@localhost>
+ bzip2/libbzip2 version 1.0.8 of 13 July 2019
+ Copyright (C) 1996-2019 Julian Seward <jseward%acm.org@localhost>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -45,12 +45,12 @@
fprintf(stderr,
Home |
Main Index |
Thread Index |
Old Index