commit 333f3d2: [Fix] Another FSM fix to accomodate possibility of multiple consequent ?

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Apr 1 11:42:07 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-01 12:40:41 +0100
URL: https://github.com/rspamd/rspamd/commit/333f3d2617cfaedfe7c75518e7855832976d031e (HEAD -> master)

[Fix] Another FSM fix to accomodate possibility of multiple consequent ?

---
 src/libmime/mime_headers.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index bb7b9373a..4d2c89dae 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -670,6 +670,14 @@ rspamd_mime_header_decode (rspamd_mempool_t *pool, const gchar *in,
 			if (*p == '?') {
 				state = got_more_qmark;
 				qmarks ++;
+
+				/* Skip multiple ? signs */
+				p ++;
+				while (p < end && *p == '?') {
+					p ++;
+				}
+
+				continue;
 			}
 			p ++;
 			break;


More information about the Commits mailing list