From 437a3606e4c4a99f2aee73260812f9f80dff522f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 30 Mar 2017 19:45:03 +0100 Subject: [PATCH] [Fix] Avoid lookup in absent hash Issue: #1569 --- src/libmime/mime_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5