From: Wilfried Goesgens Date: Thu, 18 Aug 2011 09:14:48 +0000 (+0000) Subject: fix QP encoding X-Git-Tag: v8.11~1017 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=94429066c040cbbe31046e08dbd2068d433b4fb6 fix QP encoding - once we decided to QP encode we also need to encode =[] --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 9804e5e4b..cdb625cc9 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2563,7 +2563,12 @@ int StrBufRFC2047encode(StrBuf **target, const StrBuf *source) if ((*target)->BufUsed + 4 >= (*target)->BufSize) IncreaseBuf(*target, 1, 0); ch = (unsigned char) source->buf[i]; - if ((ch < 32) || (ch > 126) || (ch == 61)) { + if ((ch < 32) || + (ch > 126) || + (ch == 61) || + (ch == '[') || + (ch == ']') ) + { sprintf(&(*target)->buf[(*target)->BufUsed], "=%02X", ch); (*target)->BufUsed += 3; }