commit 7a181b1: [Minor] Add safety guards

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jul 8 14:49:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-07-08 15:45:06 +0100
URL: https://github.com/rspamd/rspamd/commit/7a181b1fe66fcf0fd5a3b94c6ceae7e9a2a08b47 (HEAD -> master)

[Minor] Add safety guards

---
 rules/html.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/html.lua b/rules/html.lua
index 852be8168..97a6b2372 100644
--- a/rules/html.lua
+++ b/rules/html.lua
@@ -216,8 +216,8 @@ local vis_check_id = rspamd_config:register_symbol{
                 transp_rate = tr
                 arg = string.format('%s color #%x%x%x bgcolor #%x%x%x',
                     tag:get_type(),
-                    bl.color[1], bl.color[2], bl.color[3],
-                    bl.bgcolor[1], bl.bgcolor[2], bl.bgcolor[3])
+                    bl.color[1] or 0, bl.color[2] or 0, bl.color[3] or 0,
+                    bl.bgcolor[1] or 0, bl.bgcolor[2] or 0, bl.bgcolor[3] or 0)
               end
             end
           end


More information about the Commits mailing list