aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-09-27 14:42:54 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-09-27 14:42:54 +0200
commit5ff71ace36fb4d2962b5b8f2085aceaf841eaff1 (patch)
tree00391e64ca61e18cc41ed70b88962f0956c59562
parentf1789cfcef342342246af95d355fca8515f92198 (diff)
downloadmblaze-5ff71ace36fb4d2962b5b8f2085aceaf841eaff1.tar.gz
rfc2047: blaze822_decode_qp: decode invalid qp-codes as literal
-rw-r--r--rfc2047.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rfc2047.c b/rfc2047.c
index 0d5bea5..6d4760a 100644
--- 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];