commit 83b9c39: [Minor] Smime: Check if we have a signed data before dereferencing

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Feb 2 12:49:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-02-02 12:44:02 +0000
URL: https://github.com/rspamd/rspamd/commit/83b9c39e0b1844a49b852af677364619913eb91e (HEAD -> master)

[Minor] Smime: Check if we have a signed data before dereferencing

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

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 "


More information about the Commits mailing list