commit d0d9673: [Fix] Zstd: Fix compression with the new Zstd API

Vsevolod Stakhov vsevolod at rspamd.com
Sun May 8 11:21:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-05-08 12:19:47 +0100
URL: https://github.com/rspamd/rspamd/commit/d0d9673d38dbb2e8aa93ae60bbbc9193e9646902 (HEAD -> master)

[Fix] Zstd: Fix compression with the new Zstd API
Issue: #4140

---
 src/libserver/cfg_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index c9fa31d21..5943ffdee 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)) {


More information about the Commits mailing list