diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-11 17:26:12 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-11 17:26:12 +0100 |
commit | c0601ffba87d3e4a559f14437467326b63852be1 (patch) | |
tree | 7541b4620152720950104ca8b6cfe1a61aeca85d | |
parent | dd280afd1a7ae260a25e6b9fff79216ee541925e (diff) | |
download | rspamd-c0601ffba87d3e4a559f14437467326b63852be1.tar.gz rspamd-c0601ffba87d3e4a559f14437467326b63852be1.zip |
[Minor] Lua_parsers: Use limit in rspamd_util.parse_mail_address
-rw-r--r-- | src/lua/lua_parsers.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |