From: Timo Sirainen Date: Sat, 17 Jun 2017 11:38:22 +0000 (+0300) Subject: imap: Fix NOTIFY to parse more than just the first event-group X-Git-Tag: 2.2.31.rc1~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ef0b42263d2e47dce871176d659008448cbde36;p=thirdparty%2Fdovecot%2Fcore.git imap: Fix NOTIFY to parse more than just the first event-group --- diff --git a/src/imap/cmd-notify.c b/src/imap/cmd-notify.c index 4c6aad975a..94cf103b88 100644 --- a/src/imap/cmd-notify.c +++ b/src/imap/cmd-notify.c @@ -292,10 +292,10 @@ cmd_notify_set(struct imap_notify_context *ctx, const struct imap_arg *args) ctx->send_immediate_status = TRUE; args++; } - for (; args->type != IMAP_ARG_EOL; args++) { - if (!imap_arg_get_list(args, &event_group)) - return -1; + if (!imap_arg_get_list(args, &event_group)) + return -1; + for (; event_group->type != IMAP_ARG_EOL; event_group++) { /* filter-mailboxes */ if (!imap_arg_get_atom(event_group, &filter_mailboxes)) return -1;