Merge pull request #2819 from terrelln/ldm-hash-rate-log
[ldm] Fix ZSTD_c_ldmHashRateLog bounds check
This commit is contained in:
@@ -866,8 +866,8 @@ size_t ZSTD_CCtxParams_setParameter(ZSTD_CCtx_params* CCtxParams,
|
|||||||
return CCtxParams->ldmParams.bucketSizeLog;
|
return CCtxParams->ldmParams.bucketSizeLog;
|
||||||
|
|
||||||
case ZSTD_c_ldmHashRateLog :
|
case ZSTD_c_ldmHashRateLog :
|
||||||
RETURN_ERROR_IF(value > ZSTD_WINDOWLOG_MAX - ZSTD_HASHLOG_MIN,
|
if (value!=0) /* 0 ==> default */
|
||||||
parameter_outOfBound, "Param out of bounds!");
|
BOUNDCHECK(ZSTD_c_ldmHashRateLog, value);
|
||||||
CCtxParams->ldmParams.hashRateLog = value;
|
CCtxParams->ldmParams.hashRateLog = value;
|
||||||
return CCtxParams->ldmParams.hashRateLog;
|
return CCtxParams->ldmParams.hashRateLog;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user