aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-03 09:19:24 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-03 09:19:24 +0000
commitd81551a9394d134dbe4298f15ea935d5a948aa4d (patch)
tree60dc0caa1814af1aacb12f18d04ea8038b1e8766
parent894cc089e1421ab56ceed946e65ab5456d57d90b (diff)
parent70fa6e154cdb43fa27cf1b671c436aac452c156e (diff)
downloadrspamd-d81551a9394d134dbe4298f15ea935d5a948aa4d.tar.gz
rspamd-d81551a9394d134dbe4298f15ea935d5a948aa4d.zip
Merge pull request #543 from fatalbanana/master
[Fix] Avoid problematic operation on possibly nil value in once_received
-rw-r--r--src/plugins/lua/once_received.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua
index 4bac5adff..d192c0b79 100644
--- a/src/plugins/lua/once_received.lua
+++ b/src/plugins/lua/once_received.lua
@@ -114,6 +114,7 @@ local function check_quantity_received (task)
-- Unresolved host
task:insert_result(symbol, 1)
+ if not hn then return end
for _,h in ipairs(bad_hosts) do
if string.find(hn, h) then
task:insert_result(symbol_strict, 1, h)