commit d142728: [Minor] Fill structure fields

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Sep 24 13:56:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-24 14:50:04 +0100
URL: https://github.com/rspamd/rspamd/commit/d142728c2eef62bf3266e9c16eb73a5a3ba63b46 (HEAD -> master)

[Minor] Fill structure fields

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

diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 33d7b1cd8..d2d0c872a 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -2203,6 +2203,7 @@ lua_task_get_urls (lua_State * L)
 			protocols_mask = default_mask;
 		}
 
+		memset (&cb, 0, sizeof (cb));
 		cb.i = 1;
 		cb.L = L;
 		cb.mask = protocols_mask;
@@ -2415,6 +2416,7 @@ lua_task_get_emails (lua_State * L)
 	if (task) {
 		if (task->message) {
 			lua_createtable (L, g_hash_table_size (MESSAGE_FIELD (task, emails)), 0);
+			memset (&cb, 0, sizeof (cb));
 			cb.i = 1;
 			cb.L = L;
 			cb.mask = PROTOCOL_MAILTO;


More information about the Commits mailing list