diff options
author | 2016-11-18 20:35:18 +1100 | |
---|---|---|
committer | 2016-11-18 20:37:20 +1100 | |
commit | bb99eba11dadfa37acb2a796f4f8e2b0a7330e44 (patch) | |
tree | 4f1f81e691e55d8e7feb47ac5c2dfd8ca0312ce1 /3rdparty/lzma/C/Ppmd7.c | |
parent | ae4b0cdcf26f610687da38c69dd94ceaba593051 (diff) |
Update LZMA to 16.04 (security and portability fixes)
Diffstat (limited to '3rdparty/lzma/C/Ppmd7.c')
-rw-r--r-- | 3rdparty/lzma/C/Ppmd7.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdparty/lzma/C/Ppmd7.c b/3rdparty/lzma/C/Ppmd7.c index 7ef84d47b3b..eda8eb70a22 100644 --- a/3rdparty/lzma/C/Ppmd7.c +++ b/3rdparty/lzma/C/Ppmd7.c @@ -1,5 +1,5 @@ /* Ppmd7.c -- PPMdH codec -2015-09-28 : Igor Pavlov : Public domain +2016-05-21 : Igor Pavlov : Public domain This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ #include "Precomp.h" @@ -639,10 +639,10 @@ CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) unsigned nonMasked = p->MinContext->NumStats - numMasked; if (p->MinContext->NumStats != 256) { - see = p->See[p->NS2Indx[nonMasked - 1]] + + see = p->See[(unsigned)p->NS2Indx[nonMasked - 1]] + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + - 2 * (p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + - 4 * (numMasked > nonMasked) + + 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (unsigned)(numMasked > nonMasked) + p->HiBitsFlag; { unsigned r = (see->Summ >> see->Shift); |