mirror of
https://github.com/facebook/zstd.git
synced 2025-10-07 00:12:40 -04:00
Merge pull request #2819 from terrelln/ldm-hash-rate-log
[ldm] Fix ZSTD_c_ldmHashRateLog bounds check
This commit is contained in:
commit
26486db9ab
@ -866,8 +866,8 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams,
|
||||
return CCtxParams->ldmParams.bucketSizeLog;
|
||||
|
||||
case ZSTD_c_ldmHashRateLog :
|
||||
RETURN_ERROR_IF(value > ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN,
|
||||
parameter_outOfBound, "Param out of bounds!");
|
||||
if (value!=0) /* 0 ==> default */
|
||||
BOUNDCHECK(ZSTD_c_ldmHashRateLog, value);
|
||||
CCtxParams->ldmParams.hashRateLog = value;
|
||||
return CCtxParams->ldmParams.hashRateLog;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user