[dovecot-cvs] dovecot/src/lib-imap imap-quote.c,1.6,1.7

cras at procontrol.fi cras at procontrol.fi
Tue Feb 11 14:31:12 EET 2003


Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv21533/lib-imap

Modified Files:
	imap-quote.c 
Log Message:
Literals sizes were sometimes set to 2^32-1.



Index: imap-quote.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-quote.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- imap-quote.c	8 Feb 2003 10:44:01 -0000	1.6
+++ imap-quote.c	11 Feb 2003 12:31:10 -0000	1.7
@@ -8,6 +8,7 @@
 		       size_t value_len)
 {
 	size_t i;
+	int literal = FALSE;
 
 	for (i = 0; i < value_len; i++) {
 		if (value[i] == 0) {
@@ -16,10 +17,10 @@
 		}
 
 		if ((value[i] & 0x80) != 0)
-			break;
+			literal = TRUE;
 	}
 
-	if (i == value_len) {
+	if (!literal) {
 		/* no 8bit chars, return as "string" */
 		str_append_c(str, '"');
 		str_append_n(str, value, value_len);




More information about the dovecot-cvs mailing list