commit 270365e: [Minor] Lua_task: Add more consistency to get_from

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Feb 27 17:21:14 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-02-27 17:14:52 +0000
URL: https://github.com/rspamd/rspamd/commit/270365edd71f0101b6ce6317286e06a8016a43a9

[Minor] Lua_task: Add more consistency to get_from

---
 src/lua/lua_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index fd1877daf..c68df4e81 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -3729,7 +3729,7 @@ lua_task_get_from (lua_State *L)
 			break;
 		}
 
-		if (addrs) {
+		if (addrs && addrs->len > 0 {
 			lua_push_emails_address_list (L, addrs, what & ~RSPAMD_ADDRESS_MASK);
 		}
 		else if (addr) {


More information about the Commits mailing list