From: Timo Sirainen Date: Sat, 17 Jun 2017 11:39:59 +0000 (+0300) Subject: imap: NOTIFY - Fix potential crash when reading invalid parameters X-Git-Tag: 2.3.0.rc1~1394 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5052aa061a3246d26a70c9a40d171cd09888ba34;p=thirdparty%2Fdovecot%2Fcore.git imap: NOTIFY - Fix potential crash when reading invalid parameters --- diff --git a/src/imap/cmd-notify.c b/src/imap/cmd-notify.c index 94cf103b88..abba017852 100644 --- a/src/imap/cmd-notify.c +++ b/src/imap/cmd-notify.c @@ -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;