]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix chaintable check to include rowhash in ZSTD_reduceIndex() 2598/head
authorsenhuang42 <senhuang96@fb.com>
Fri, 30 Apr 2021 23:52:04 +0000 (19:52 -0400)
committersenhuang42 <senhuang96@fb.com>
Fri, 30 Apr 2021 23:52:04 +0000 (19:52 -0400)
lib/compress/zstd_compress.c

index 5f4c98eaad0ec16538a68975ff1f4d5ce9fb4a1f..0c5acba68211bedde6116ec478c745aec5d65bf3 100644 (file)
@@ -2303,7 +2303,7 @@ static void ZSTD_reduceIndex (ZSTD_matchState_t* ms, ZSTD_CCtx_params const* par
         ZSTD_reduceTable(ms->hashTable, hSize, reducerValue);
     }
 
-    if (params->cParams.strategy != ZSTD_fast) {
+    if (ZSTD_allocateChainTable(params->cParams.strategy, params->useRowMatchFinder, (U32)ms->dedicatedDictSearch)) {
         U32 const chainSize = (U32)1 << params->cParams.chainLog;
         if (params->cParams.strategy == ZSTD_btlazy2)
             ZSTD_reduceTable_btlazy2(ms->chainTable, chainSize, reducerValue);