dovecot-2.0: acl: Don't assert-crash if removing all rights.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 16 03:09:40 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/836646906a63
changeset: 9474:836646906a63
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 15 19:38:30 2009 -0400
description:
acl: Don't assert-crash if removing all rights.
diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
src/plugins/acl/acl-backend-vfile.c | 3 ++-
diffs (13 lines):
diff -r 57a2431852f5 -r 836646906a63 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c Mon Jun 15 19:40:08 2009 -0400
+++ b/src/plugins/acl/acl-backend-vfile.c Mon Jun 15 19:38:30 2009 -0400
@@ -901,7 +901,8 @@ static bool modify_right_list(pool_t poo
array_append(&rights, &old_rights[i], 1);
}
new_rights = &null;
- modify_rights = array_idx(&rights, 0);
+ modify_rights = array_count(&rights) == 0 ? NULL :
+ array_idx(&rights, 0);
acl_rights_merge(pool, &new_rights, modify_rights, TRUE);
break;
case ACL_MODIFY_MODE_ADD:
More information about the dovecot-cvs
mailing list