dovecot-2.2: virtual: Added more asserts.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 17 11:28:31 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/91d8f998bf83
changeset: 18878:91d8f998bf83
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 17 14:23:38 2015 +0300
description:
virtual: Added more asserts.

diffstat:

 src/plugins/virtual/virtual-storage.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 1e6f38e8d5d5 -r 91d8f998bf83 src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c	Wed Jun 17 14:04:42 2015 +0300
+++ b/src/plugins/virtual/virtual-storage.c	Wed Jun 17 14:23:38 2015 +0300
@@ -628,6 +628,7 @@
 	while (seq_range_array_iter_nth(&iter, n++, &uid)) {
 		while (i < count && uids[i].real_uid < uid) i++;
 		if (i < count && uids[i].real_uid == uid) {
+			i_assert(uids[i].virtual_uid > 0);
 			seq_range_array_add(virtual_uids_r, 
 					    uids[i].virtual_uid);
 			i++;
@@ -667,6 +668,7 @@
 
 			array_append(virtual_uids_r, &zero, 1);
 		} else {
+			i_assert(uids[i].virtual_uid > 0);
 			array_append(virtual_uids_r, &uids[i].virtual_uid, 1);
 			i++;
 		}


More information about the dovecot-cvs mailing list