dovecot-1.2: imap: LIST "" inbox shouldn't crash when using name...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Dec 23 23:00:43 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/56dd8c276ed6
changeset: 9521:56dd8c276ed6
user: Timo Sirainen <tss at iki.fi>
date: Wed Dec 23 16:00:36 2009 -0500
description:
imap: LIST "" inbox shouldn't crash when using namespace with "INBOX." prefix.
diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
src/imap/cmd-list.c | 8 ++++++--
diffs (19 lines):
diff -r d1548d794f72 -r 56dd8c276ed6 src/imap/cmd-list.c
--- a/src/imap/cmd-list.c Wed Dec 23 13:22:21 2009 -0500
+++ b/src/imap/cmd-list.c Wed Dec 23 16:00:36 2009 -0500
@@ -223,9 +223,13 @@ static const char *ns_get_listed_prefix(
struct imap_match_glob *glob;
enum imap_match_result match;
const char *ns_prefix, *p;
-
+ bool inboxcase;
+
+ inboxcase = strncasecmp(ctx->ns->prefix, "INBOX", 5) == 0 &&
+ ctx->ns->prefix[5] == ctx->ns->sep;
glob = imap_match_init_multiple(pool_datastack_create(),
- ctx->patterns, FALSE, ctx->ns->sep);
+ ctx->patterns, inboxcase,
+ ctx->ns->sep);
ns_prefix = ctx->ns->prefix;
match = imap_match(glob, ns_prefix);
if (match == IMAP_MATCH_YES) {
More information about the dovecot-cvs
mailing list