aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_trie.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-15 20:23:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-15 20:23:35 +0000
commit0e270dbe709e743ec840999c05e35f4d63be69b4 (patch)
tree810753d3258d55c35efc599f279d560accb6fe40 /src/lua/lua_trie.c
parente0446369d13269d07cecb5711fbab7d7bc64398a (diff)
downloadrspamd-0e270dbe709e743ec840999c05e35f4d63be69b4.tar.gz
rspamd-0e270dbe709e743ec840999c05e35f4d63be69b4.zip
[Fix] Fix couple of issues
Found by: Coverity
Diffstat (limited to 'src/lua/lua_trie.c')
-rw-r--r--src/lua/lua_trie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_trie.c b/src/lua/lua_trie.c
index 0531197a2..5911842b9 100644
--- a/src/lua/lua_trie.c
+++ b/src/lua/lua_trie.c
@@ -256,7 +256,7 @@ lua_trie_search_mime (lua_State *L)
gsize len, i;
gboolean found = FALSE;
- if (trie) {
+ if (trie && task) {
for (i = 0; i < task->text_parts->len; i ++) {
part = g_ptr_array_index (task->text_parts, i);
@@ -292,7 +292,7 @@ lua_trie_search_rawmsg (lua_State *L)
gsize len;
gboolean found = FALSE;
- if (trie) {
+ if (trie && task) {
text = task->msg.begin;
len = task->msg.len;
@@ -322,7 +322,7 @@ lua_trie_search_rawbody (lua_State *L)
gsize len;
gboolean found = FALSE;
- if (trie) {
+ if (trie && task) {
if (task->raw_headers_content.len > 0) {
text = task->msg.begin + task->raw_headers_content.len;
len = task->msg.len - task->raw_headers_content.len;