[dovecot-cvs] dovecot/src/lib-imap imap-parser.c,1.32,1.33
cras at procontrol.fi
cras at procontrol.fi
Tue Jan 21 23:43:25 EET 2003
Update of /home/cvs/dovecot/src/lib-imap
In directory danu:/tmp/cvs-serv4153/lib-imap
Modified Files:
imap-parser.c
Log Message:
Missing ')' wasn't reported correctly.
Index: imap-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-imap/imap-parser.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- imap-parser.c 10 Jan 2003 20:58:28 -0000 1.32
+++ imap-parser.c 21 Jan 2003 21:43:23 -0000 1.33
@@ -508,6 +508,7 @@
return TRUE;
}
+/* ARG_PARSE_NONE checks that last argument isn't only partially parsed. */
#define IS_UNFINISHED(parser) \
((parser)->cur_type != ARG_PARSE_NONE || \
(parser)->cur_list != parser->root_list)
@@ -534,8 +535,13 @@
return -1;
} else if ((!IS_UNFINISHED(parser) && count > 0 &&
parser->root_list->size >= count) || parser->eol) {
- /* all arguments read / end of line. ARG_PARSE_NONE checks
- that last argument isn't only partially parsed. */
+ /* all arguments read / end of line. */
+ if (parser->list_arg != NULL) {
+ parser->error = "Missing ')'";
+ *args = NULL;
+ return -1;
+ }
+
if (count >= parser->root_list->alloc) {
/* unused arguments must be NIL-filled. */
parser->root_list = LIST_REALLOC(parser,
More information about the dovecot-cvs
mailing list