From: Vsevolod Stakhov Date: Thu, 30 Mar 2017 18:45:03 +0000 (+0100) Subject: [Fix] Avoid lookup in absent hash X-Git-Tag: 1.5.5~76 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=437a3606e4c4a99f2aee73260812f9f80dff522f;p=rspamd.git [Fix] Avoid lookup in absent hash Issue: #1569 --- 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);