From: Timo Sirainen Date: Sat, 2 Nov 2013 20:32:23 +0000 (+0200) Subject: lib-imap: When writing "NIL" as astring, write it always as a "quoted". X-Git-Tag: 2.2.7~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1e430b62d5bb21dc0d227b06a7a322283d75c452;p=thirdparty%2Fdovecot%2Fcore.git lib-imap: When writing "NIL" as astring, write it always as a "quoted". --- diff --git a/src/lib-imap/imap-quote.c b/src/lib-imap/imap-quote.c index 73dd5d430f..0af3443a68 100644 --- a/src/lib-imap/imap-quote.c +++ b/src/lib-imap/imap-quote.c @@ -34,7 +34,8 @@ void imap_append_astring(string_t *dest, const char *src) return; } } - if (i == 0) + /* don't mix up NIL and "NIL"! */ + if (i == 0 || strcasecmp(src, "NIL") == 0) imap_append_string(dest, src); else str_append(dest, src);