aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-03-03 10:43:59 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-03-03 10:43:59 +0200
commit70fa6e154cdb43fa27cf1b671c436aac452c156e (patch)
tree60dc0caa1814af1aacb12f18d04ea8038b1e8766
parent894cc089e1421ab56ceed946e65ab5456d57d90b (diff)
downloadrspamd-70fa6e154cdb43fa27cf1b671c436aac452c156e.tar.gz
rspamd-70fa6e154cdb43fa27cf1b671c436aac452c156e.zip
[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)