From: Timo Sirainen Date: Fri, 28 May 2010 11:31:22 +0000 (+0100) Subject: doveadm: force-resync now fails if mailbox name isn't valid UTF-8 X-Git-Tag: 2.0.beta6~117 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e44673dfd467a069c4b34760fa2fcfeefa74449;p=thirdparty%2Fdovecot%2Fcore.git doveadm: force-resync now fails if mailbox name isn't valid UTF-8 --HG-- branch : HEAD --- diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index 51e207577a..3201ab77d0 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -79,8 +79,9 @@ mailbox_find_and_open(struct mail_user *user, const char *mailbox) const char *orig_mailbox = mailbox; str = t_str_new(128); - if (imap_utf8_to_utf7(mailbox, str) == 0) - mailbox = str_c(str); + if (imap_utf8_to_utf7(mailbox, str) < 0) + i_fatal("Mailbox name not valid UTF-8: %s", mailbox); + mailbox = str_c(str); ns = mail_namespace_find(user->namespaces, &mailbox); if (ns == NULL)