Skip to content

Commit f1059e0

Browse files
committed
Abort if Unsupported Parameters Used
1 parent f23e729 commit f1059e0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/compress/zstd_compress.c

+6
Original file line numberDiff line numberDiff line change
@@ -4820,6 +4820,8 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
48204820
case ZSTD_dfast:
48214821
#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR
48224822
ZSTD_fillDoubleHashTable(ms, iend, dtlm, tfp);
4823+
#else
4824+
assert(0); /* shouldn't be called: cparams should've been adjusted. */
48234825
#endif
48244826
break;
48254827

@@ -4845,6 +4847,8 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
48454847
DEBUGLOG(4, "Using chain-based hash table for lazy dict");
48464848
}
48474849
}
4850+
#else
4851+
assert(0); /* shouldn't be called: cparams should've been adjusted. */
48484852
#endif
48494853
break;
48504854

@@ -4857,6 +4861,8 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
48574861
|| !defined(ZSTD_EXCLUDE_BTULTRA_BLOCK_COMPRESSOR)
48584862
assert(srcSize >= HASH_READ_SIZE);
48594863
ZSTD_updateTree(ms, iend-HASH_READ_SIZE, iend);
4864+
#else
4865+
assert(0); /* shouldn't be called: cparams should've been adjusted. */
48604866
#endif
48614867
break;
48624868

lib/compress/zstd_ldm.c

+2
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static size_t ZSTD_ldm_fillFastTables(ZSTD_matchState_t* ms,
248248
case ZSTD_dfast:
249249
#ifndef ZSTD_EXCLUDE_DFAST_BLOCK_COMPRESSOR
250250
ZSTD_fillDoubleHashTable(ms, iend, ZSTD_dtlm_fast, ZSTD_tfp_forCCtx);
251+
#else
252+
assert(0); /* shouldn't be called: cparams should've been adjusted. */
251253
#endif
252254
break;
253255

0 commit comments

Comments
 (0)