zstd_opt.h: fixed checking of rep codes (2)
This commit is contained in:
parent
c4b5106f7f
commit
6b68ba2079
@ -885,7 +885,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
|
|||||||
const U32 repIndex = (U32)(current+cur - opt[cur].rep[i]);
|
const U32 repIndex = (U32)(current+cur - opt[cur].rep[i]);
|
||||||
const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
|
const BYTE* const repBase = repIndex < dictLimit ? dictBase : base;
|
||||||
const BYTE* const repMatch = repBase + repIndex;
|
const BYTE* const repMatch = repBase + repIndex;
|
||||||
if ((rep[i]<(U32)(ip-prefixStart))
|
if ((opt[cur].rep[i]<(U32)(ip-prefixStart))
|
||||||
&& (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
|
&& (((U32)((dictLimit-1) - repIndex) >= 3) & (repIndex>lowestIndex)) /* intentional overflow */
|
||||||
&& (MEM_readMINMATCH(inr, minMatch) == MEM_readMINMATCH(repMatch, minMatch)) ) {
|
&& (MEM_readMINMATCH(inr, minMatch) == MEM_readMINMATCH(repMatch, minMatch)) ) {
|
||||||
/* repcode detected */
|
/* repcode detected */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user