From: Vsevolod Stakhov Date: Sun, 8 May 2022 11:19:47 +0000 (+0100) Subject: [Fix] Zstd: Fix compression with the new Zstd API X-Git-Tag: 3.3~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0d9673d38dbb2e8aa93ae60bbbc9193e9646902;p=thirdparty%2Frspamd.git [Fix] Zstd: Fix compression with the new Zstd API Issue: #4140 --- diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index c9fa31d217..5943ffdee1 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -2890,7 +2890,7 @@ rspamd_libs_reset_compression (struct rspamd_external_libs_ctx *ctx) /* Dictionary will be reused automatically if specified */ r = ZSTD_CCtx_reset (ctx->out_zstream, ZSTD_reset_session_only); if (!ZSTD_isError (r)) { - r = ZSTD_CCtx_setPledgedSrcSize (ctx->out_zstream, 0); + r = ZSTD_CCtx_setPledgedSrcSize (ctx->out_zstream, ZSTD_CONTENTSIZE_UNKNOWN); } if (ZSTD_isError (r)) {