dovecot-2.1: lib-storage: Fixed crash when attempting to remove ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 12 08:48:35 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/a79e1a0040de
changeset: 14761:a79e1a0040de
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Oct 12 08:48:25 2012 +0300
description:
lib-storage: Fixed crash when attempting to remove subscriptions for nonexistent shared users.

diffstat:

 src/lib-storage/list/mailbox-list-subscriptions.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r e44579c5b52b -r a79e1a0040de src/lib-storage/list/mailbox-list-subscriptions.c
--- a/src/lib-storage/list/mailbox-list-subscriptions.c	Fri Oct 12 08:31:15 2012 +0300
+++ b/src/lib-storage/list/mailbox-list-subscriptions.c	Fri Oct 12 08:48:25 2012 +0300
@@ -110,6 +110,8 @@
 	char sep;
 	int ret;
 
+	/* src_list is subscriptions=yes, dest_list is subscriptions=no
+	   (or the same as src_list) */
 	i_assert((src_list->ns->flags & NAMESPACE_FLAG_SUBSCRIPTIONS) != 0);
 
 	if (dest_list->subscriptions == NULL) {
@@ -151,8 +153,8 @@
 			i_warning("Subscriptions file %s: "
 				  "Removing invalid entry: %s",
 				  path, name);
-			(void)subsfile_set_subscribed(dest_list, path,
-				mailbox_list_get_temp_prefix(dest_list),
+			(void)subsfile_set_subscribed(src_list, path,
+				mailbox_list_get_temp_prefix(src_list),
 				name, FALSE);
 
 		}


More information about the dovecot-cvs mailing list