diff options
author | delphij <delphij@FreeBSD.org> | 2008-03-20 02:16:44 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2008-03-20 02:16:44 +0000 |
commit | f7f2bc33c7bf01ac1d008be067b742291619545a (patch) | |
tree | f0701aa0211907db82e523f51c6d0adab5fec1c6 /contrib/bzip2/bzlib_private.h | |
parent | 37ec1b7b9867586fd638a686b873162d19c0b635 (diff) | |
download | FreeBSD-src-f7f2bc33c7bf01ac1d008be067b742291619545a.zip FreeBSD-src-f7f2bc33c7bf01ac1d008be067b742291619545a.tar.gz |
Virgin import (trimmed) of Bzip2 version 1.0.5.
Diffstat (limited to 'contrib/bzip2/bzlib_private.h')
-rw-r--r-- | contrib/bzip2/bzlib_private.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/bzip2/bzlib_private.h b/contrib/bzip2/bzlib_private.h index d0a0554..2342787 100644 --- a/contrib/bzip2/bzlib_private.h +++ b/contrib/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.4 of 20 December 2006 - Copyright (C) 1996-2006 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.4, 20-Dec-2006" +#define BZ_VERSION "1.0.5, 10-Dec-2007" typedef char Char; typedef unsigned char Bool; @@ -442,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; @@ -469,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. --*/ |