diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 530611dd..69e97789 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -268,6 +268,7 @@ size_t ZSTD_resetCCtxParams(ZSTD_CCtx_params* params) size_t ZSTD_initCCtxParams(ZSTD_CCtx_params* cctxParams, ZSTD_parameters params) { + if (!cctxParams) { return ERROR(GENERIC); } memset(cctxParams, 0, sizeof(ZSTD_CCtx_params)); cctxParams->cParams = params.cParams; cctxParams->fParams = params.fParams;