commit f3ff58d: [Feature] Core: Relax quoted-printable encoding
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Jan 16 15:07:05 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-01-16 14:11:50 +0000
URL: https://github.com/rspamd/rspamd/commit/f3ff58dd3b28a283020a9ea54113f6295041fad5
[Feature] Core: Relax quoted-printable encoding
---
src/libutil/str_util.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c
index 0c63edba2..27d50aead 100644
--- a/src/libutil/str_util.c
+++ b/src/libutil/str_util.c
@@ -1931,7 +1931,7 @@ rspamd_decode_qp_buf (const gchar *in, gsize inlen,
gchar *o, *end, *pos, c;
const gchar *p;
guchar ret;
- gsize remain, processed;
+ gssize remain, processed;
p = in;
o = out;
@@ -1967,6 +1967,14 @@ decode:
continue;
}
+ else {
+ /* Hack, hack, hack, treat =<garbadge> as =<garbadge> */
+ if (remain > 0) {
+ *o++ = *(p - 1);
+ }
+
+ continue;
+ }
if (remain > 0) {
c = *p++;
More information about the Commits
mailing list