]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix crash on parts with no cd
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 26 Oct 2019 19:08:49 +0000 (20:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 26 Oct 2019 19:09:02 +0000 (20:09 +0100)
src/libmime/archives.c

index d938dbcf3475678644a4ae46dd7f4aaea4152d9d..8c7e4ea90e31d50c4ce630d378e71891f6a233d6 100644 (file)
@@ -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, '.',