]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Zstd: Fix compression with the new Zstd API
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 8 May 2022 11:19:47 +0000 (12:19 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 8 May 2022 11:19:47 +0000 (12:19 +0100)
Issue: #4140

src/libserver/cfg_utils.c

index c9fa31d217baad9906ffef70b7257f57de525451..5943ffdee1bf73d2e4f5a6be24dc25af48a995a1 100644 (file)
@@ -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)) {