mirror of
https://github.com/facebook/zstd.git
synced 2025-12-17 00:03:34 -05:00
fixed roll buffer greedy mode
This commit is contained in:
parent
9a24e5986b
commit
734aa92ed5
@ -1497,6 +1497,7 @@ size_t ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx* ctx,
|
|||||||
const U32 repIndex = (U32)(current+1 - offset_1);
|
const U32 repIndex = (U32)(current+1 - offset_1);
|
||||||
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 ((repIndex <= dictLimit-4) || (repIndex >= dictLimit))
|
||||||
if (MEM_read32(ip+1) == MEM_read32(repMatch))
|
if (MEM_read32(ip+1) == MEM_read32(repMatch))
|
||||||
{
|
{
|
||||||
/* repcode detected we should take it */
|
/* repcode detected we should take it */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user