Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9521:56dd8c276ed6 HEAD
imap: LIST "" inbox shouldn't crash when using namespace with "INBOX." prefix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 23 Dec 2009 16:00:36 -0500 |
parents | d1548d794f72 |
children | 029c3afcfbd0 |
files | src/imap/cmd-list.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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) {