[dovecot-cvs] dovecot/src/lib-imap imap-quote.c,1.8,1.9
cras at procontrol.fi
cras at procontrol.fi
Tue Mar 4 03:10:30 EET 2003
Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv11706/lib-imap
Modified Files:
imap-quote.c
Log Message:
Use literals for strings containing '"' and '\' characters too. This wasn't
done at all before so FETCH ENVELOPE, BODY and BODYSTRUCTURE could have
returned pretty broken results.
Index: imap-quote.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-quote.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- imap-quote.c 13 Feb 2003 21:07:44 -0000 1.8
+++ imap-quote.c 4 Mar 2003 01:10:28 -0000 1.9
@@ -19,12 +19,13 @@
if (value[i] == 13 || value[i] == 10)
linefeeds++;
- if ((value[i] & 0x80) != 0)
+ if ((value[i] & 0x80) != 0 ||
+ value[i] == '"' || value[i] == '\\')
literal = TRUE;
}
if (!literal) {
- /* no 8bit chars, return as "string" */
+ /* no 8bit chars or imapspecials, return as "string" */
str_append_c(str, '"');
} else {
/* return as literal */
More information about the dovecot-cvs
mailing list