]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: NOTIFY - Fix potential crash when reading invalid parameters
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Jun 2017 11:39:59 +0000 (14:39 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 19 Jun 2017 09:36:11 +0000 (12:36 +0300)
src/imap/cmd-notify.c

index 94cf103b88e1660f5b6b2fe8b7246b12631ac859..abba017852c3a40d77d10050bd658326c2588ab5 100644 (file)
@@ -319,6 +319,8 @@ cmd_notify_set(struct imap_notify_context *ctx, const struct imap_arg *args)
 
                if (strcasecmp(filter_mailboxes, "subtree") == 0 ||
                    strcasecmp(filter_mailboxes, "mailboxes") == 0) {
+                       if (event_group->type == IMAP_ARG_EOL)
+                               return -1;
                        mailboxes = event_group++;
                } else {
                        mailboxes = NULL;