aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-07 12:08:18 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-07 12:08:18 +0100
commitc0e15f80395c488709b9e1bac6bec664791a5448 (patch)
treedb01faacd17bd64baa2ee6f1c4e69e766722c6f8
parent9d5a725bd691c385f9eb456c4f07440c0b518380 (diff)
downloadrspamd-c0e15f80395c488709b9e1bac6bec664791a5448.tar.gz
rspamd-c0e15f80395c488709b9e1bac6bec664791a5448.zip
[Minor] Try to fix another boundary issue
-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 fc7743896..f539954ef 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 idx <= len do
+ while b >= 127 and idx < len do
-- utf8 part
if bit.band(b, 0xe0) == 0xc0 and remain > 1 and
bit.band(bytes[idx + 1], 0xc0) == 0x80 then