diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-30 19:45:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-30 19:45:03 +0100 |
commit | 437a3606e4c4a99f2aee73260812f9f80dff522f (patch) | |
tree | e5ae6586bb44f72a3be6bd40a4c9ea8a0d5c0456 /src/libmime/mime_parser.c | |
parent | 30324e7c53dff01bc477b592a24a1f8cc0037406 (diff) | |
download | rspamd-437a3606e4c4a99f2aee73260812f9f80dff522f.tar.gz rspamd-437a3606e4c4a99f2aee73260812f9f80dff522f.zip |
[Fix] Avoid lookup in absent hash
Issue: #1569
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r-- | src/libmime/mime_parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 193a3808c..1626cecbe 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -326,7 +326,7 @@ rspamd_mime_part_get_cd (struct rspamd_task *task, struct rspamd_mime_part *part cd->type = RSPAMD_CT_INLINE; /* We can also have content dispositon definitions in Content-Type */ - if (part->ct) { + if (part->ct && part->ct->attrs) { RSPAMD_FTOK_ASSIGN (&srch, "name"); found = g_hash_table_lookup (part->ct->attrs, &srch); |