dovecot-2.1: fs layout: Fixed crash when autocreate mailboxes we...

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 16 18:10:22 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/72e1e17d2e22
changeset: 14156:72e1e17d2e22
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 16 18:10:09 2012 +0200
description:
fs layout: Fixed crash when autocreate mailboxes were used and LIST had only invalid patterns.

diffstat:

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

diffs (15 lines):

diff -r 908bf2312c14 -r 72e1e17d2e22 src/lib-storage/list/mailbox-list-fs-iter.c
--- a/src/lib-storage/list/mailbox-list-fs-iter.c	Wed Feb 15 05:49:20 2012 +0200
+++ b/src/lib-storage/list/mailbox-list-fs-iter.c	Thu Feb 16 18:10:09 2012 +0200
@@ -407,7 +407,10 @@
 	ctx->info.ns = _list->ns;
 
 	if (!fs_list_get_valid_patterns(ctx, patterns)) {
-		/* we've only invalid patterns (or INBOX) */
+		/* we've only invalid patterns (or INBOX). create a glob
+		   anyway to avoid any crashes due to glob being accessed
+		   elsewhere */
+		ctx->ctx.glob = imap_match_init(pool, "", TRUE, ctx->sep);
 		return &ctx->ctx;
 	}
 	ctx->ctx.glob = imap_match_init_multiple(pool, ctx->valid_patterns,


More information about the dovecot-cvs mailing list