]> source.dussan.org Git - rspamd.git/commitdiff
Add safety guard for rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Feb 2016 12:49:25 +0000 (12:49 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Feb 2016 12:49:25 +0000 (12:49 +0000)
rules/html.lua

index cfec9d90b41c65a40e074f43be7e8a88f7e3d6cc..3ceaed6728fc5bf30be4c6bfb2ae10435190dc75 100644 (file)
@@ -29,7 +29,7 @@ local function check_html_image(task, min, max)
       local len = p:get_length()
 
 
-      if len >= min and len < max then
+      if hc and len >= min and len < max then
         local images = hc:get_images()
         if images then
           for _,i in ipairs(images) do