commit d6ae964: [Fix] Deal with double eqsigns when decoding headers

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Sep 1 14:14:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-09-01 15:09:34 +0100
URL: https://github.com/rspamd/rspamd/commit/d6ae9647d2d5ad8ad291c8d462acecbc3c74dd13 (HEAD -> master)

[Fix] Deal with double eqsigns when decoding headers

---
 src/libmime/mime_headers.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index 58e1b7ca0..34cafd8cb 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -659,9 +659,10 @@ rspamd_mime_header_decode (rspamd_mempool_t *pool, const gchar *in,
 				qmarks = 0;
 			}
 			else {
-				g_string_append_len (out, c, 2);
-				c = p + 1;
+				g_string_append_len (out, c, 1);
+				c = p;
 				state = parse_normal;
+				continue; /* Deal with == case */
 			}
 			p ++;
 			break;


More information about the Commits mailing list