]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Avoid lookup in absent hash
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 30 Mar 2017 18:45:03 +0000 (19:45 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 30 Mar 2017 18:45:03 +0000 (19:45 +0100)
Issue: #1569

src/libmime/mime_parser.c

index 193a3808c1d090432e91f9499b1b78665144740f..1626cecbe547b5a2b2e19598b458000a371aef52 100644 (file)
@@ -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);