summaryrefslogtreecommitdiff
path: root/zip/ZipArchive/bzip2/bzcompress.c
diff options
context:
space:
mode:
Diffstat (limited to 'zip/ZipArchive/bzip2/bzcompress.c')
-rw-r--r--zip/ZipArchive/bzip2/bzcompress.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/zip/ZipArchive/bzip2/bzcompress.c b/zip/ZipArchive/bzip2/bzcompress.c
index 2aef85d..97fe84e 100644
--- a/zip/ZipArchive/bzip2/bzcompress.c
+++ b/zip/ZipArchive/bzip2/bzcompress.c
@@ -8,14 +8,14 @@
This file is part of bzip2/libbzip2, a program and library for
lossless, block-sorting data compression.
- bzip2/libbzip2 version 1.0.4 of 20 December 2006
- Copyright (C) 1996-2006 Julian Seward <jseward@bzip.org>
+ bzip2/libbzip2 version 1.0.8 of 13 July 2019
+ Copyright (C) 1996-2019 Julian Seward <jseward@acm.org>
Please read the WARNING, DISCLAIMER and PATENTS sections in the
- bzlib.h file.
+ README file.
This program is released under the terms of the license contained
- in the file bzlib.h.
+ in the file LICENSE.
------------------------------------------------------------------ */
@@ -28,9 +28,10 @@
#include "bzlib_private.h"
-#ifdef ZIP_ARCHIVE_BZIP2_INTERNAL
-
-
+// TD CHANGE:
+#if _MSC_VER > 1000
+ #pragma warning (push)
+#endif
/*---------------------------------------------------*/
/*--- Bit stream I/O ---*/
/*---------------------------------------------------*/
@@ -160,6 +161,8 @@ void generateMTFValues ( EState* s )
wr = 0;
zPend = 0;
+ // TD CHANGE: preventing uninitialized memory
+ memset(yy, 0, 256);
for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
for (i = 0; i < s->nblock; i++) {
@@ -204,6 +207,10 @@ void generateMTFValues ( EState* s )
*ryy_j = rtmp2;
};
yy[0] = rtmp;
+ // TD CHANGE:
+#if _MSC_VER > 1000
+#pragma warning (disable : 4244)
+#endif
j = ryy_j - &(yy[0]);
mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
}
@@ -226,7 +233,10 @@ void generateMTFValues ( EState* s )
};
zPend = 0;
}
-
+ // TD CHANGE:
+#if _MSC_VER > 1000
+ #pragma warning (disable: 6385)
+#endif
mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
s->nMTF = wr;
@@ -456,7 +466,7 @@ void sendMTFValues ( EState* s )
AssertH( nGroups < 8, 3002 );
AssertH( nSelectors < 32768 &&
- nSelectors <= (2 + (900000 / BZ_G_SIZE)),
+ nSelectors <= BZ_MAX_SELECTORS,
3003 );
@@ -668,6 +678,9 @@ void BZ2_compressBlock ( EState* s, Bool is_last_block )
}
}
+// TD CHANGE:
+#if _MSC_VER > 1000
+ #pragma warning (pop)
#endif
/*-------------------------------------------------------------*/