aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-06 22:24:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-06 22:24:00 +0100
commit24054b0a095953c6577d7f89ad4686de71345fea (patch)
treed8e8e032903e7e5b9bee7add4c8986d0a43da9e2
parent8381b141d52546897af76c0798ec5bda654a6104 (diff)
downloadrspamd-24054b0a095953c6577d7f89ad4686de71345fea.tar.gz
rspamd-24054b0a095953c6577d7f89ad4686de71345fea.zip
[Minor] Fix check condition
-rw-r--r--lualib/lua_magic/heuristics.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lualib/lua_magic/heuristics.lua b/lualib/lua_magic/heuristics.lua
index 66e186906..d977596ca 100644
--- a/lualib/lua_magic/heuristics.lua
+++ b/lualib/lua_magic/heuristics.lua
@@ -333,7 +333,7 @@ exports.text_part_heuristic = function(part, log_obj, _)
local b = bytes[idx]
local n8bit = 0
- while b >= 127 and n8bit < remain do
+ while b >= 127 and idx < remain do
-- utf8 part
if bit.band(b, 0xe0) == 0xc0 and remain > 1 and
bit.band(bytes[idx + 1], 0xc0) == 0x80 then