From: Stella Lau Date: Tue, 5 Sep 2017 22:50:14 +0000 (-0700) Subject: Fix parameter handling in copyCCtx with cdict X-Git-Tag: fuzz-corpora2~10^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d33fe1c91cb2f6a4f8316c2df3731e904df2c4;p=thirdparty%2Fzstd.git Fix parameter handling in copyCCtx with cdict --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index d4d3ae961..7863fae0a 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -1094,7 +1094,8 @@ static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx, if (srcCCtx->stage!=ZSTDcs_init) return ERROR(stage_wrong); memcpy(&dstCCtx->customMem, &srcCCtx->customMem, sizeof(ZSTD_customMem)); - { ZSTD_CCtx_params params = srcCCtx->appliedParams; + { ZSTD_CCtx_params params = dstCCtx->requestedParams; + params.cParams = srcCCtx->appliedParams.cParams; params.fParams = fParams; ZSTD_resetCCtx_internal(dstCCtx, params, pledgedSrcSize, ZSTDcrp_noMemset, zbuff);