aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bzip2/blocksort.c4
-rw-r--r--src/bzip2/bzlib.c9
-rw-r--r--src/bzip2/bzlib.h4
-rw-r--r--src/bzip2/bzlib_private.h6
-rw-r--r--src/bzip2/compress.c4
-rw-r--r--src/bzip2/crctable.c4
-rw-r--r--src/bzip2/decompress.c24
-rw-r--r--src/bzip2/huffman.c4
-rw-r--r--src/bzip2/randtable.c4
9 files changed, 22 insertions, 41 deletions
diff --git a/src/bzip2/blocksort.c b/src/bzip2/blocksort.c
index d0d662c..bd2dec1 100644
--- a/src/bzip2/blocksort.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/src/bzip2/bzlib.c b/src/bzip2/bzlib.c
index bd358a7..b98f3e5 100644
--- a/src/bzip2/bzlib.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -28,6 +28,7 @@
bzBuffToBuffDecompress. Fixed.
*/
+#define _CRT_SECURE_NO_WARNINGS
#include "bzlib_private.h"
@@ -1375,7 +1376,7 @@ const char * BZ_API(BZ2_bzlibVersion)(void)
#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
# include <fcntl.h>
# include <io.h>
-# define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
+# define SET_BINARY_MODE(file) _setmode(_fileno(file),O_BINARY)
#else
# define SET_BINARY_MODE(file)
#endif
@@ -1428,7 +1429,7 @@ BZFILE * bzopen_or_bzdopen
#ifdef BZ_STRICT_ANSI
fp = NULL;
#else
- fp = fdopen(fd,mode2);
+ fp = _fdopen(fd,mode2);
#endif
}
if (fp == NULL) return NULL;
diff --git a/src/bzip2/bzlib.h b/src/bzip2/bzlib.h
index 8277123..c5b75d6 100644
--- a/src/bzip2/bzlib.h
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/src/bzip2/bzlib_private.h b/src/bzip2/bzlib_private.h
index 5d0217f..2342787 100644
--- a/src/bzip2/bzlib_private.h
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 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.6, 6-Sept-2010"
+#define BZ_VERSION "1.0.5, 10-Dec-2007"
typedef char Char;
typedef unsigned char Bool;
diff --git a/src/bzip2/compress.c b/src/bzip2/compress.c
index caf7696..8c80a07 100644
--- a/src/bzip2/compress.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/src/bzip2/crctable.c b/src/bzip2/crctable.c
index 1fea7e9..215687b 100644
--- a/src/bzip2/crctable.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/src/bzip2/decompress.c b/src/bzip2/decompress.c
index 311f566..bba5e0f 100644
--- a/src/bzip2/decompress.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
@@ -381,13 +381,6 @@ 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;
@@ -492,28 +485,15 @@ 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/src/bzip2/huffman.c b/src/bzip2/huffman.c
index 2283fdb..87e79e3 100644
--- a/src/bzip2/huffman.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.
diff --git a/src/bzip2/randtable.c b/src/bzip2/randtable.c
index 6d62459..068b763 100644
--- a/src/bzip2/randtable.c
+++ b/src/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.6 of 6 September 2010
- Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.5 of 10 December 2007
+ Copyright (C) 1996-2007 Julian Seward <jseward@bzip.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
README file.