From 94429066c040cbbe31046e08dbd2068d433b4fb6 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 18 Aug 2011 09:14:48 +0000 Subject: [PATCH] fix QP encoding - once we decided to QP encode we also need to encode =[] --- libcitadel/lib/stringbuf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.30.2