dovecot-2.2: imap: Fixed crash in NOTIFY when there were watched...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 29 13:29:43 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/787cfed25b0f
changeset: 19340:787cfed25b0f
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 29 15:29:24 2015 +0200
description:
imap: Fixed crash in NOTIFY when there were watched namespaces that didn't support NOTIFY.

diffstat:

 src/imap/imap-notify.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 594cd05217eb -r 787cfed25b0f src/imap/imap-notify.c
--- a/src/imap/imap-notify.c	Thu Oct 29 15:06:16 2015 +0200
+++ b/src/imap/imap-notify.c	Thu Oct 29 15:29:24 2015 +0200
@@ -245,6 +245,9 @@
 	const struct mailbox_list_notify_rec *rec;
 	int ret, ret2 = 1;
 
+	if (notify_ns->notify == NULL)
+		return 0; /* notifications not supported in this namespace */
+
 	while ((ret = mailbox_list_notify_next(notify_ns->notify, &rec)) > 0) {
 		if (imap_notify_match(notify_ns, rec)) T_BEGIN {
 			ret2 = imap_notify_next(notify_ns, rec);


More information about the dovecot-cvs mailing list