mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 5ff71ace36fb4d2962b5b8f2085aceaf841eaff1
parent f1789cfcef342342246af95d355fca8515f92198
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Wed, 27 Sep 2017 14:42:54 +0200

rfc2047: blaze822_decode_qp: decode invalid qp-codes as literal

Diffstat:
rfc2047.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rfc2047.c b/rfc2047.c @@ -41,9 +41,9 @@ blaze822_decode_qp(char *start, char *stop, char **deco, size_t *decleno, int un unsigned char c2 = s[2]; s += 3; if (c1 > 127 || c2 > 127 || hex[c1] < 0 || hex[c2] < 0) { - *buf++ = '?'; - *buf++ = '?'; - *buf++ = '?'; + *buf++ = '='; + *buf++ = c1; + *buf++ = c2; continue; } *buf++ = (hex[c1] << 4) | hex[c2];