From: Wilfried Göesgens Date: Mon, 5 Feb 2007 21:17:50 +0000 (+0000) Subject: * remove =\n and friends instead of replacing it. X-Git-Tag: v7.86~3595 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=3896b2a5c49830087db5b49842b390b150b614ad;p=citadel.git * remove =\n and friends instead of replacing it. --- diff --git a/citadel/mime_parser.c b/citadel/mime_parser.c index a543c688a..deb06aeed 100644 --- a/citadel/mime_parser.c +++ b/citadel/mime_parser.c @@ -62,6 +62,7 @@ char *fixed_partnum(char *supplied_partnum) { /* * Convert "quoted-printable" to binary. Returns number of bytes decoded. + * according to RFC2045 section 6.7 */ int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) { unsigned int ch; @@ -82,8 +83,8 @@ int CtdlDecodeQuotedPrintable(char *decoded, char *encoded, int sourcelen) { (*check == '\n') || (*check == '\r')) { - decoded[destpos - 1] = '\r'; - decoded[destpos] = '\n'; + decoded[destpos - 1] = '\0'; + destpos-=2; } else if (sourcelen - sourcepos > 2) {