commit 843a6e1: [Minor] Fix task with no config case

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Nov 25 17:42:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-11-25 17:40:48 +0000
URL: https://github.com/rspamd/rspamd/commit/843a6e1bcd0bc3a50079ecccf7685f590c678004 (HEAD -> master)

[Minor] Fix task with no config case

---
 src/libmime/message.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libmime/message.c b/src/libmime/message.c
index 18eef9f22..b2b53d4ba 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1343,7 +1343,9 @@ rspamd_message_process (struct rspamd_task *task)
 		msg_err_task ("cannot require lua_content.maybe_process_mime_part");
 	}
 
-	funcs_top = lua_gettop (L);
+	if (L) {
+		funcs_top = lua_gettop (L);
+	}
 
 	PTR_ARRAY_FOREACH (MESSAGE_FIELD (task, parts), i, part) {
 		if (magic_func_pos != -1 && part->parsed_data.len > 0) {


More information about the Commits mailing list