[dovecot-cvs] dovecot/src/lib-imap imap-parser.c,1.18,1.19

cras at procontrol.fi cras at procontrol.fi
Sat Nov 30 17:56:07 EET 2002


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

Modified Files:
	imap-parser.c 
Log Message:
Lists still weren't fully parsed always.



Index: imap-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-parser.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- imap-parser.c	30 Nov 2002 15:40:18 -0000	1.18
+++ imap-parser.c	30 Nov 2002 15:56:05 -0000	1.19
@@ -502,9 +502,11 @@
 		*args = NULL;
 		return -1;
 	} else if ((parser->cur_type == ARG_PARSE_NONE &&
-		    parser->root_list->size >= count) || parser->eol) {
+		    parser->root_list->size >= count &&
+		    parser->list_arg == NULL) || parser->eol) {
 		/* all arguments read / end of line. ARG_PARSE_NONE checks
-		   that last argument isn't only partially parsed. */
+		   that last argument isn't only partially parsed.
+		   list_arg == NULL makes sure the lists are closed. */
 		if (count >= parser->root_list->alloc) {
 			/* unused arguments must be NIL-filled. */
 			parser->root_list->alloc = count+1;




More information about the dovecot-cvs mailing list