# HG changeset patch # User Timo Sirainen # Date 1497699599 -10800 # Node ID f65e7542dd4ff1e9360b754cc6828e9e192ca05b # Parent df426d9ec0ae533361e4d2133e8c14aad397aa67 imap: NOTIFY - Fix potential crash when reading invalid parameters diff -r df426d9ec0ae -r f65e7542dd4f src/imap/cmd-notify.c --- a/src/imap/cmd-notify.c Sat Jun 17 14:38:22 2017 +0300 +++ b/src/imap/cmd-notify.c Sat Jun 17 14:39:59 2017 +0300 @@ -319,6 +319,8 @@ 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;