aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-16 14:11:50 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-16 14:11:50 +0000
commitf3ff58dd3b28a283020a9ea54113f6295041fad5 (patch)
tree6323d5be369e4f5e46c4a504cb2620f3ac5aecda /src
parentbe6ad351d49de79dd1ab64e63b50d9779db92d2d (diff)
downloadrspamd-f3ff58dd3b28a283020a9ea54113f6295041fad5.tar.gz
rspamd-f3ff58dd3b28a283020a9ea54113f6295041fad5.zip
[Feature] Core: Relax quoted-printable encoding
Diffstat (limited to 'src')
-rw-r--r--src/libutil/str_util.c10
1 files changed, 9 insertions, 1 deletions
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++;