Mercurial > dovecot > core-2.2
changeset 10871:83166197d2a5 HEAD
Don't crash when trying to list shared namespace prefix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 09 Mar 2010 00:25:52 +0200 |
parents | 6d260794f278 |
children | 3f9c7a8a92b9 |
files | src/lib-storage/mailbox-list.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;