From a55f3e05b6462e063e0501f6251bd05c39f4eaab Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 11 Nov 2017 15:25:54 +0000 Subject: [Fix] Fix text splitting: stack overflow (too many captures) MFH: rspamd-1.6 --- src/plugins/lua/phishing.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index cd2288067..e76ffc79a 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -248,8 +248,8 @@ end local function rspamd_str_split_fun(s, sep, func) local lpeg = require "lpeg" sep = lpeg.P(sep) - local elem = lpeg.C((1 - sep)^0 / func) - local p = lpeg.C(elem * (sep * elem)^0) -- make a table capture + local elem = lpeg.P((1 - sep)^0 / func) + local p = lpeg.P(elem * (sep * elem)^0) return p:match(s) end -- cgit v1.2.3