diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-11 15:25:54 +0000 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2018-01-24 11:54:04 +0200 |
commit | 94acd27366c2c42e6e003f80f916dd6137bc9941 (patch) | |
tree | 114169b542fadc7d43228e6ddc86a28a6087f256 /src | |
parent | 0dac4f30d5e8ea807ad16e16a6397cfb98215076 (diff) | |
download | rspamd-94acd27366c2c42e6e003f80f916dd6137bc9941.tar.gz rspamd-94acd27366c2c42e6e003f80f916dd6137bc9941.zip |
[Fix] Fix text splitting: stack overflow (too many captures)
MFH: rspamd-1.6
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/phishing.lua | 4 |
1 files 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 |