commit c0601ff: [Minor] Lua_parsers: Use limit in rspamd_util.parse_mail_address
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Jun 11 16:42:06 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-06-11 17:26:12 +0100
URL: https://github.com/rspamd/rspamd/commit/c0601ffba87d3e4a559f14437467326b63852be1
[Minor] Lua_parsers: Use limit in rspamd_util.parse_mail_address
---
src/lua/lua_parsers.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lua/lua_parsers.c b/src/lua/lua_parsers.c
index 6c75d8039..4180ac0d9 100644
--- a/src/lua/lua_parsers.c
+++ b/src/lua/lua_parsers.c
@@ -250,6 +250,7 @@ lua_parsers_parse_mail_address (lua_State *L)
GPtrArray *addrs;
gsize len;
const gchar *str = luaL_checklstring (L, 1, &len);
+ gint max_addrs = luaL_optinteger(L, 2, 10240);
rspamd_mempool_t *pool;
gboolean own_pool = FALSE;
@@ -268,7 +269,7 @@ lua_parsers_parse_mail_address (lua_State *L)
own_pool = TRUE;
}
- addrs = rspamd_email_address_from_mime (pool, str, len, NULL, -1);
+ addrs = rspamd_email_address_from_mime (pool, str, len, NULL, max_addrs);
if (addrs == NULL) {
lua_pushnil (L);
More information about the Commits
mailing list