]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't crash if subscribed mailbox begins with hierarchy separator.
authorTimo Sirainen <tss@iki.fi>
Sun, 25 May 2008 19:31:10 +0000 (22:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 25 May 2008 19:31:10 +0000 (22:31 +0300)
--HG--
branch : HEAD

src/lib-storage/mailbox-tree.c

index 79a01b9056d61915c0f26326002625f0d8cc9ebd..a43382d5e1ba2cd0df1c117a8c057115b9542554 100644 (file)
@@ -200,7 +200,7 @@ mailbox_tree_iterate_next(struct mailbox_tree_iterate_context *ctx,
                str_truncate(ctx->path_str, ctx->parent_pos);
                if (ctx->first_child) {
                        ctx->first_child = FALSE;
-                       if (ctx->parent_pos != 0) {
+                       if (node->parent != NULL) {
                                str_append_c(ctx->path_str, ctx->separator);
                                ctx->parent_pos++;
                        }