dovecot-2.2: lib-imap: When writing "NIL" as astring, write it a...

dovecot at dovecot.org dovecot at dovecot.org
Sat Nov 2 22:32:36 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/720c7d01ad8a
changeset: 16919:720c7d01ad8a
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Nov 02 22:32:23 2013 +0200
description:
lib-imap: When writing "NIL" as astring, write it always as a "quoted".

diffstat:

 src/lib-imap/imap-quote.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 081b1ba65fd4 -r 720c7d01ad8a src/lib-imap/imap-quote.c
--- a/src/lib-imap/imap-quote.c	Sat Nov 02 22:31:14 2013 +0200
+++ b/src/lib-imap/imap-quote.c	Sat Nov 02 22:32:23 2013 +0200
@@ -34,7 +34,8 @@
 			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);


More information about the dovecot-cvs mailing list