commit 0c3144e: [Fix] Fix crash on parts with no cd

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Oct 26 19:14:09 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-10-26 20:08:49 +0100
URL: https://github.com/rspamd/rspamd/commit/0c3144ed76b67795a2ddc559a985b736b8155d69

[Fix] Fix crash on parts with no cd

---
 src/libmime/archives.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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, '.',


More information about the Commits mailing list