From: Vsevolod Stakhov Date: Wed, 16 Jan 2019 14:11:50 +0000 (+0000) Subject: [Feature] Core: Relax quoted-printable encoding X-Git-Tag: 1.9.0~311 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f3ff58dd3b28a283020a9ea54113f6295041fad5;p=thirdparty%2Frspamd.git [Feature] Core: Relax quoted-printable encoding --- diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index 0c63edba2d..27d50aead9 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 = as = */ + if (remain > 0) { + *o++ = *(p - 1); + } + + continue; + } if (remain > 0) { c = *p++;