]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix parameter handling in copyCCtx with cdict
authorStella Lau <laus@fb.com>
Tue, 5 Sep 2017 22:50:14 +0000 (15:50 -0700)
committerStella Lau <laus@fb.com>
Tue, 5 Sep 2017 22:50:20 +0000 (15:50 -0700)
lib/compress/zstd_compress.c

index d4d3ae961e749997d2f3a0ee08b9b6822e6048ca..7863fae0aad0362a9f7afe7735df70ce8f11d883 100644 (file)
@@ -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);