]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mailbox_list_get_unexpanded_path(): Don't crash with -o mail_location=..
authorTimo Sirainen <tss@iki.fi>
Fri, 11 Jun 2010 20:39:11 +0000 (21:39 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 11 Jun 2010 20:39:11 +0000 (21:39 +0100)
--HG--
branch : HEAD

src/lib-storage/mailbox-list.c

index b1f61ef4d4d4f66577f940a06c56adc01570f4e3..becf5c7a3b4d87646a3693eb5f60c1f9e798e652 100644 (file)
@@ -323,6 +323,10 @@ const char *mailbox_list_get_unexpanded_path(struct mailbox_list *list,
                        user->unexpanded_set, MAIL_STORAGE_SET_DRIVER_NAME);
                i_assert(mail_set != NULL);
                location = mail_set->mail_location;
+               if (*location == '1') {
+                       /* we'll get here if using -o mail_location=.. */
+                       return "";
+               }
                i_assert(*location == '0');
                location++;
        }