]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Avoid problematic operation on possibly nil value in once_received 543/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 3 Mar 2016 08:43:59 +0000 (10:43 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 3 Mar 2016 08:43:59 +0000 (10:43 +0200)
src/plugins/lua/once_received.lua

index 4bac5adff000d5d6ebfd69f5b42337423af5241e..d192c0b794446230733e09880e7c53c304727836 100644 (file)
@@ -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)