Return error code when initializing NULL cctxParams
This commit is contained in:
parent
25be09c6b4
commit
560b34f6d2
@ -268,6 +268,7 @@ size_t ZSTD_resetCCtxParams(ZSTD_CCtx_params* params)
|
|||||||
|
|
||||||
size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params)
|
size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params)
|
||||||
{
|
{
|
||||||
|
if (!cctxParams) { return ERROR(GENERIC); }
|
||||||
memset(cctxParams, 0, sizeof(ZSTD_CCtx_params));
|
memset(cctxParams, 0, sizeof(ZSTD_CCtx_params));
|
||||||
cctxParams->cParams = params.cParams;
|
cctxParams->cParams = params.cParams;
|
||||||
cctxParams->fParams = params.fParams;
|
cctxParams->fParams = params.fParams;
|
||||||
|
Loading…
Reference in New Issue
Block a user