dovecot-2.0: Don't crash when listing shared namespace prefix.

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 9 22:04:00 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/e616c3d00c2c
changeset: 9752:e616c3d00c2c
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 09 15:03:40 2009 -0400
description:
Don't crash when listing shared namespace prefix.

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/lib-storage/mailbox-list.c |    7 ++++---

diffs (17 lines):

diff -r e90fd94136d0 -r e616c3d00c2c src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Sun Aug 09 14:58:38 2009 -0400
+++ b/src/lib-storage/mailbox-list.c	Sun Aug 09 15:03:40 2009 -0400
@@ -679,9 +679,10 @@ int mailbox_list_mailbox(struct mailbox_
 
 	*flags_r = 0;
 	path = mailbox_list_get_path(list, name, MAILBOX_LIST_PATH_TYPE_DIR);
-	return list->v.iter_is_mailbox(&ctx, path, "", "",
-				       MAILBOX_LIST_FILE_TYPE_UNKNOWN,
-				       flags_r);
+	return list->v.iter_is_mailbox == NULL ? 0 :
+		list->v.iter_is_mailbox(&ctx, path, "", "",
+					MAILBOX_LIST_FILE_TYPE_UNKNOWN,
+					flags_r);
 }
 
 void mailbox_list_add_change(struct mailbox_list *list,


More information about the dovecot-cvs mailing list