aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-13 15:41:28 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-13 15:41:28 +0100
commit29f38bde308faed44b6298338451fb7b82923c65 (patch)
tree1e8307334be1df53c13b8f46b872fa1012aeb655
parentfe8df9944b2132bbb421b0291852e32b7dfdcf92 (diff)
downloadrspamd-29f38bde308faed44b6298338451fb7b82923c65.tar.gz
rspamd-29f38bde308faed44b6298338451fb7b82923c65.zip
[Minor] Correct deflate header detection
-rw-r--r--src/lua/lua_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c
index d89cfd28d..04413f2f6 100644
--- a/src/lua/lua_util.c
+++ b/src/lua/lua_util.c
@@ -2392,7 +2392,7 @@ lua_util_zlib_inflate (lua_State *L, int windowBits)
/* Here are dragons to distinguish between raw deflate and zlib */
if (windowBits == MAX_WBITS && t->len > 0) {
- if ((int)(unsigned char)t->start[0] != 0x78) {
+ if ((int)(unsigned char)((t->start[0] << 4)) != 0x80) {
/* Assume raw deflate */
windowBits = -windowBits;
}