[dovecot-cvs] dovecot/src/lib seq-range-array.c,1.3,1.4

cras at dovecot.org cras at dovecot.org
Wed Apr 12 19:57:11 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv7413

Modified Files:
	seq-range-array.c 
Log Message:
seq_range_array_remove(): Don't crash if array is empty.



Index: seq-range-array.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- seq-range-array.c	31 Mar 2006 21:19:05 -0000	1.3
+++ seq-range-array.c	12 Apr 2006 16:57:09 -0000	1.4
@@ -112,7 +112,8 @@
 		return;
 
 	data = array_get_modifyable(array, &count);
-	i_assert(count > 0);
+	if (count == 0)
+		return;
 
 	/* quick checks */
 	if (seq > data[count-1].seq2 || seq < data[0].seq1) {



More information about the dovecot-cvs mailing list