Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1011:cdfd647b0cbb HEAD
Don't crash with "SEARCH ()"
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 21 Jan 2003 23:48:29 +0200 |
parents | 3c30228ae095 |
children | b2d9219c60af |
files | src/imap/imap-search.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-search.c Tue Jan 21 23:43:23 2003 +0200 +++ b/src/imap/imap-search.c Tue Jan 21 23:48:29 2003 +0200 @@ -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) {