[dovecot-cvs] dovecot/src/imap imap-search.c,1.1,1.2
cras at procontrol.fi
cras at procontrol.fi
Tue Jan 21 23:48:31 EET 2003
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv30138
Modified Files:
imap-search.c
Log Message:
Don't crash with "SEARCH ()"
Index: imap-search.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-search.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- imap-search.c 20 Jan 2003 14:52:51 -0000 1.1
+++ imap-search.c 21 Jan 2003 21:48:29 -0000 1.2
@@ -93,6 +93,11 @@
if (arg->type == IMAP_ARG_LIST) {
struct imap_arg *listargs = IMAP_ARG_LIST(arg)->args;
+ if (listargs->type == IMAP_ARG_EOL) {
+ data->error = "Empty list not allowed";
+ return FALSE;
+ }
+
*next_sarg = search_arg_new(data->pool, SEARCH_SUB);
subargs = &(*next_sarg)->value.subargs;
while (listargs->type != IMAP_ARG_EOL) {
More information about the dovecot-cvs
mailing list