From: Timo Sirainen Date: Fri, 3 Apr 2009 16:35:02 +0000 (-0400) Subject: acl: Don't crash if shared_storage_get_namespace() fails. X-Git-Tag: 1.2.rc1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9058819da9f17e4a96c6430601603ca24e447e9;p=thirdparty%2Fdovecot%2Fcore.git acl: Don't crash if shared_storage_get_namespace() fails. --HG-- branch : HEAD --- diff --git a/src/plugins/acl/acl-shared-storage.c b/src/plugins/acl/acl-shared-storage.c index 4ee6338733..806ef926a9 100644 --- a/src/plugins/acl/acl-shared-storage.c +++ b/src/plugins/acl/acl-shared-storage.c @@ -46,7 +46,8 @@ acl_shared_namespace_add(struct mail_user *user, str = t_str_new(128); var_expand(str, sstorage->ns_prefix_pattern, tab); mailbox = str_c(str); - shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns); + if (shared_storage_get_namespace(&sstorage->storage, &mailbox, &ns) < 0) + return; /* check if there are any mailboxes really visible to us */ iter = mailbox_list_iter_init(ns->list, "*",