From: Vsevolod Stakhov Date: Sat, 26 Oct 2019 19:08:49 +0000 (+0100) Subject: [Fix] Fix crash on parts with no cd X-Git-Tag: 2.1~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c3144ed76b67795a2ddc559a985b736b8155d69;p=rspamd.git [Fix] Fix crash on parts with no cd --- diff --git a/src/libmime/archives.c b/src/libmime/archives.c index d938dbcf3..8c7e4ea90 100644 --- a/src/libmime/archives.c +++ b/src/libmime/archives.c @@ -1766,7 +1766,7 @@ rspamd_archive_process_gzip (struct rspamd_task *task, } /* Fallback, we need to extract file name from archive name if possible */ - if (part->cd->filename.len > 0) { + if (part->cd && part->cd->filename.len > 0) { const gchar *dot_pos, *slash_pos; dot_pos = rspamd_memrchr (part->cd->filename.begin, '.',