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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user