From 333f3d2617cfaedfe7c75518e7855832976d031e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 1 Apr 2021 12:40:41 +0100 Subject: [Fix] Another FSM fix to accomodate possibility of multiple consequent ? --- src/libmime/mime_headers.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libmime') 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; -- cgit v1.2.3