]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't crash when trying to list shared namespace prefix.
authorTimo Sirainen <tss@iki.fi>
Mon, 8 Mar 2010 22:25:52 +0000 (00:25 +0200)
committerTimo Sirainen <tss@iki.fi>
Mon, 8 Mar 2010 22:25:52 +0000 (00:25 +0200)
--HG--
branch : HEAD

src/lib-storage/mailbox-list.c

index efdea7a1d6aff6644406a791f7fd2c6a83a63a8c..a113ee43666393f3d54fb23a31406aeceb18ee2c 100644 (file)
@@ -677,6 +677,10 @@ int mailbox_list_mailbox(struct mailbox_list *list, const char *name,
        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;