]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Smime: Check if we have a signed data before dereferencing
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Feb 2021 12:44:02 +0000 (12:44 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Feb 2021 12:44:02 +0000 (12:44 +0000)
src/libmime/mime_parser.c

index 207bd4462820585879f0c1bc2d54beb38c147fc1..e74201f27d8eda1ddf6e50d6b0291deb6c49588b 100644 (file)
@@ -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 "