From 83b9c39e0b1844a49b852af677364619913eb91e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 2 Feb 2021 12:44:02 +0000 Subject: [Minor] Smime: Check if we have a signed data before dereferencing --- src/libmime/mime_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libmime/mime_parser.c') diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 207bd4462..e74201f27 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -726,7 +726,7 @@ rspamd_mime_parse_normal_part (struct rspamd_task *task, ct_nid = OBJ_obj2nid (p7_signed_content->type); - if (ct_nid == NID_pkcs7_data) { + if (ct_nid == NID_pkcs7_data && p7_signed_content->d.data) { int ret; msg_debug_mime ("found an additional part inside of " -- cgit v1.2.3