commit a1e2033: [Minor] Lua_content: Fix some more crappy pdf issues

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jan 13 17:28:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-01-13 17:23:25 +0000
URL: https://github.com/rspamd/rspamd/commit/a1e2033433b5954638454b4435c3dbcd9e89c477 (HEAD -> master)

[Minor] Lua_content: Fix some more crappy pdf issues

---
 lualib/lua_content/pdf.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua
index 516eb8be2..b3fa03f28 100644
--- a/lualib/lua_content/pdf.lua
+++ b/lualib/lua_content/pdf.lua
@@ -54,7 +54,7 @@ local pdf_patterns = {
   },
   start_object = {
     patterns = {
-      [=[[\r\n\0]\s*\d+ \d+ obj[\r\n]]=]
+      [=[[\r\n\0]\s*\d+\s+\d+\s+obj[\r\n]]=]
     }
   },
   end_object = {
@@ -408,7 +408,7 @@ local function process_dict(task, pdf, obj, dict)
 
     local resources = dict.Resources
     if resources and type(resources) == 'table' then
-      obj.resources = resources
+      obj.resources = maybe_dereference_object(resources, pdf, task)
     else
       -- Fucking pdf: we need to inherit from parent
       resources = {}


More information about the Commits mailing list