diff options
Diffstat (limited to 'zip/ZipArchive/bzip2/bzlib_private.h')
| -rw-r--r-- | zip/ZipArchive/bzip2/bzlib_private.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/zip/ZipArchive/bzip2/bzlib_private.h b/zip/ZipArchive/bzip2/bzlib_private.h index 310ca97..3755a6f 100644 --- a/zip/ZipArchive/bzip2/bzlib_private.h +++ b/zip/ZipArchive/bzip2/bzlib_private.h @@ -8,21 +8,17 @@ 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. ------------------------------------------------------------------ */ -#include "bzlib.h" - -#ifdef ZIP_ARCHIVE_BZIP2_INTERNAL - #ifndef _BZLIB_PRIVATE_H #define _BZLIB_PRIVATE_H @@ -34,10 +30,13 @@ #include <string.h> #endif +#include "bzlib.h" + + /*-- General stuff. --*/ -#define BZ_VERSION "1.0.4, 20-Dec-2006" +#define BZ_VERSION "1.0.8, 13-Jul-2019" typedef char Char; typedef unsigned char Bool; @@ -443,11 +442,15 @@ typedef /*-- Macros for decompression. --*/ #define BZ_GET_FAST(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ s->tPos = s->tt[s->tPos]; \ cccc = (UChar)(s->tPos & 0xff); \ s->tPos >>= 8; #define BZ_GET_FAST_C(cccc) \ + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \ c_tPos = c_tt[c_tPos]; \ cccc = (UChar)(c_tPos & 0xff); \ c_tPos >>= 8; @@ -470,8 +473,10 @@ typedef (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16)) #define BZ_GET_SMALL(cccc) \ - cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ - s->tPos = GET_LL(s->tPos); + /* c_tPos is unsigned, hence test < 0 is pointless. */ \ + if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \ + cccc = BZ2_indexIntoF ( s->tPos, s->cftab ); \ + s->tPos = GET_LL(s->tPos); /*-- externs for decompression. --*/ @@ -496,9 +501,6 @@ BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*, #ifndef NULL #define NULL 0 #endif - -#endif - #endif |
