dovecot-2.0: Don't crash when trying to list shared namespace pr...

dovecot at dovecot.org dovecot at dovecot.org
Tue Mar 9 00:34:25 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/83166197d2a5
changeset: 10871:83166197d2a5
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Mar 09 00:25:52 2010 +0200
description:
Don't crash when trying to list shared namespace prefix.

diffstat:

 src/lib-storage/mailbox-list.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff -r 6d260794f278 -r 83166197d2a5 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Tue Mar 09 00:08:16 2010 +0200
+++ b/src/lib-storage/mailbox-list.c	Tue Mar 09 00:25:52 2010 +0200
@@ -677,6 +677,10 @@
 	struct stat st;
 
 	path = mailbox_list_get_path(list, name, MAILBOX_LIST_PATH_TYPE_DIR);
+	if (path == NULL) {
+		/* shouldn't happen with anything except shared mailboxes */
+		return 0;
+	}
 	fname = strrchr(path, '/');
 	if (fname == NULL) {
 		fname = path;


More information about the dovecot-cvs mailing list