]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Silence zlib preset dictionary inflate errors
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 15 Jan 2026 10:14:55 +0000 (10:14 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 15 Jan 2026 10:14:55 +0000 (10:14 +0000)
src/lua/lua_compress.c

index c82394ed62db4afb2b0c4a9ecc47f68b9f916007..7aa8d8ef864bcfcbb97a79a2c76657614bf4471b 100644 (file)
@@ -270,8 +270,10 @@ int lua_compress_zlib_decompress(lua_State *L, bool is_gzip)
                                break;
                        }
                        else {
-                               msg_err("cannot decompress data: %s (last error: %s)",
-                                               zError(rc), strm.msg);
+                               if (rc != Z_NEED_DICT) {
+                                       msg_err("cannot decompress data: %s (last error: %s)",
+                                                       zError(rc), strm.msg);
+                               }
                                lua_pop(L, 1); /* Text will be freed here */
                                lua_pushnil(L);
                                inflateEnd(&strm);