commit 7b4a319: [Fix] Core: Fix processing of NDNs of certain type

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jan 18 17:56:03 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-01-18 17:52:16 +0000
URL: https://github.com/rspamd/rspamd/commit/7b4a3195897f7e3b4e01ba01ef02c2fc74a9f904 (HEAD -> master)

[Fix] Core: Fix processing of NDNs of certain type

---
 src/libmime/mime_parser.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index 1dc3d85d8..4439d055e 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -1215,13 +1215,16 @@ rspamd_mime_parse_message (struct rspamd_task *task,
 						FALSE);
 			}
 		}
+		else {
+			body_pos = 0;
+
+			hdrs = rspamd_message_get_header_from_hash (npart->raw_headers,
+					task->task_pool,
+					"Content-Type", FALSE);
+		}
 
 		pbegin = part->parsed_data.begin + body_pos;
 		plen = part->parsed_data.len - body_pos;
-
-		hdrs = rspamd_message_get_header_from_hash (npart->raw_headers,
-				task->task_pool,
-				"Content-Type", FALSE);
 	}
 
 	npart->raw_data.begin = pbegin;


More information about the Commits mailing list