summaryrefslogtreecommitdiffstats
path: root/third_party/bzip2
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 21:11:04 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-22 21:11:04 +0000
commitbef362b699466a6889e3c35a1e0754d19d6c4807 (patch)
tree98d7e7a1584c8f8a3aa83a41e9d506d92e96b100 /third_party/bzip2
parentd240989ee7dc9f243181f0f3fc6cdd5a5566efc1 (diff)
downloadchromium_src-bef362b699466a6889e3c35a1e0754d19d6c4807.zip
chromium_src-bef362b699466a6889e3c35a1e0754d19d6c4807.tar.gz
chromium_src-bef362b699466a6889e3c35a1e0754d19d6c4807.tar.bz2
bzip2: update to 1.0.6
BUG=56522 TEST=none http://codereview.chromium.org/3474004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60223 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/bzip2')
-rw-r--r--third_party/bzip2/LICENSE4
-rw-r--r--third_party/bzip2/README9
-rw-r--r--third_party/bzip2/blocksort.c4
-rw-r--r--third_party/bzip2/bzlib.c4
-rw-r--r--third_party/bzip2/bzlib.h4
-rw-r--r--third_party/bzip2/bzlib_private.h6
-rw-r--r--third_party/bzip2/compress.c4
-rw-r--r--third_party/bzip2/crctable.c4
-rw-r--r--third_party/bzip2/decompress.c24
-rw-r--r--third_party/bzip2/huffman.c4
-rw-r--r--third_party/bzip2/randtable.c4
11 files changed, 48 insertions, 23 deletions
diff --git a/third_party/bzip2/LICENSE b/third_party/bzip2/LICENSE
index f420cff..cc61417 100644
--- a/third_party/bzip2/LICENSE
+++ b/third_party/bzip2/LICENSE
@@ -2,7 +2,7 @@
--------------------------------------------------------------------------
This program, "bzip2", the associated library "libbzip2", and all
-documentation, are copyright (C) 1996-2007 Julian R Seward. All
+documentation, are copyright (C) 1996-2010 Julian R Seward. All
rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -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@bzip.org
-bzip2/libbzip2 version 1.0.5 of 10 December 2007
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
--------------------------------------------------------------------------
diff --git a/third_party/bzip2/README b/third_party/bzip2/README
index e17a84e..9fb0f636 100644
--- a/third_party/bzip2/README
+++ b/third_party/bzip2/README
@@ -6,8 +6,8 @@ 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.5 of 10 December 2007
-Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+bzip2/libbzip2 version 1.0.6 of 6 September 2010
+Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in this file.
@@ -181,6 +181,10 @@ 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@bzip.org
@@ -208,3 +212,4 @@ Cambridge, UK.
15 February 2005 (bzip2, version 1.0.3)
20 December 2006 (bzip2, version 1.0.4)
10 December 2007 (bzip2, version 1.0.5)
+ 6 Sept 2010 (bzip2, version 1.0.6)
diff --git a/third_party/bzip2/blocksort.c b/third_party/bzip2/blocksort.c
index bd2dec1..d0d662c 100644
--- a/third_party/bzip2/blocksort.c
+++ b/third_party/bzip2/blocksort.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/bzlib.c b/third_party/bzip2/bzlib.c
index ef86c91..bd358a7 100644
--- a/third_party/bzip2/bzlib.c
+++ b/third_party/bzip2/bzlib.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/bzlib.h b/third_party/bzip2/bzlib.h
index c5b75d6..8277123 100644
--- a/third_party/bzip2/bzlib.h
+++ b/third_party/bzip2/bzlib.h
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/bzlib_private.h b/third_party/bzip2/bzlib_private.h
index 23427879..5d0217f 100644
--- a/third_party/bzip2/bzlib_private.h
+++ b/third_party/bzip2/bzlib_private.h
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -36,7 +36,7 @@
/*-- General stuff. --*/
-#define BZ_VERSION "1.0.5, 10-Dec-2007"
+#define BZ_VERSION "1.0.6, 6-Sept-2010"
typedef char Char;
typedef unsigned char Bool;
diff --git a/third_party/bzip2/compress.c b/third_party/bzip2/compress.c
index 8c80a07..caf7696 100644
--- a/third_party/bzip2/compress.c
+++ b/third_party/bzip2/compress.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/crctable.c b/third_party/bzip2/crctable.c
index 215687b..1fea7e9 100644
--- a/third_party/bzip2/crctable.c
+++ b/third_party/bzip2/crctable.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/decompress.c b/third_party/bzip2/decompress.c
index bba5e0f..311f566 100644
--- a/third_party/bzip2/decompress.c
+++ b/third_party/bzip2/decompress.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -381,6 +381,13 @@ Int32 BZ2_decompress ( DState* s )
es = -1;
N = 1;
do {
+ /* Check that N doesn't get too big, so that es doesn't
+ go negative. The maximum value that can be
+ RUNA/RUNB encoded is equal to the block size (post
+ the initial RLE), viz, 900k, so bounding N at 2
+ million should guard against overflow without
+ rejecting any legitimate inputs. */
+ if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR);
if (nextSym == BZ_RUNA) es = es + (0+1) * N; else
if (nextSym == BZ_RUNB) es = es + (1+1) * N;
N = N * 2;
@@ -485,15 +492,28 @@ Int32 BZ2_decompress ( DState* s )
RETURN(BZ_DATA_ERROR);
/*-- Set up cftab to facilitate generation of T^(-1) --*/
+ /* Check: unzftab entries in range. */
+ for (i = 0; i <= 255; i++) {
+ if (s->unzftab[i] < 0 || s->unzftab[i] > nblock)
+ RETURN(BZ_DATA_ERROR);
+ }
+ /* Actually generate cftab. */
s->cftab[0] = 0;
for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
+ /* Check: cftab entries in range. */
for (i = 0; i <= 256; i++) {
if (s->cftab[i] < 0 || s->cftab[i] > nblock) {
/* s->cftab[i] can legitimately be == nblock */
RETURN(BZ_DATA_ERROR);
}
}
+ /* Check: cftab entries non-descending. */
+ for (i = 1; i <= 256; i++) {
+ if (s->cftab[i-1] > s->cftab[i]) {
+ RETURN(BZ_DATA_ERROR);
+ }
+ }
s->state_out_len = 0;
s->state_out_ch = 0;
diff --git a/third_party/bzip2/huffman.c b/third_party/bzip2/huffman.c
index 87e79e3..2283fdb 100644
--- a/third_party/bzip2/huffman.c
+++ b/third_party/bzip2/huffman.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/third_party/bzip2/randtable.c b/third_party/bzip2/randtable.c
index 068b763..6d62459 100644
--- a/third_party/bzip2/randtable.c
+++ b/third_party/bzip2/randtable.c
@@ -8,8 +8,8 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.5 of 10 December 2007
- Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.6 of 6 September 2010
+ Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.