# HG changeset patch # User Timo Sirainen # Date 1261602036 18000 # Node ID 56dd8c276ed6bc9d925f9838abac67e32faf0e87 # Parent d1548d794f7213973964a1c9f6de60963a709b86 imap: LIST "" inbox shouldn't crash when using namespace with "INBOX." prefix. 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 @@ 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) {