From 1e430b62d5bb21dc0d227b06a7a322283d75c452 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 2 Nov 2013 22:32:23 +0200 Subject: [PATCH] lib-imap: When writing "NIL" as astring, write it always as a "quoted". --- src/lib-imap/imap-quote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.3