fix(compress): reject by-reference dictionaries in Rust fast path

Include localDict.dict in the eligibility guard for the simple Rust compress2 route. By-reference dictionary loads populate this field without populating dictBuffer, so omitting it incorrectly allowed a dictionary-bearing context to bypass the C dictionary path.

Test Plan:
- ./tests/fuzzer -s9634 -v
- git diff --check
This commit is contained in:
2026-07-18 16:42:28 +02:00
parent 09ea3e6334
commit 47eaed7fcc
+1
View File
@@ -3942,6 +3942,7 @@ int ZSTD_rust_simpleCompress2Level(const void* opaqueCctx, size_t srcSize)
|| cctx->seqCollector.collectSequences != 0
|| cctx->cdict != NULL
|| cctx->prefixDict.dict != NULL
|| cctx->localDict.dict != NULL
|| cctx->localDict.dictBuffer != NULL
|| cctx->localDict.cdict != NULL) {
return (-2147483647 - 1);