[dovecot-cvs] dovecot/src/lib-storage/index index-search.c, 1.115, 1.116

tss-movial at dovecot.org tss-movial at dovecot.org
Tue Jun 20 18:29:23 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv10650/lib-storage/index

Modified Files:
	index-search.c 
Log Message:
Don't crash if seqset restrictions caused no messages to be searched.



Index: index-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-search.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- index-search.c	20 Jun 2006 15:16:36 -0000	1.115
+++ index-search.c	20 Jun 2006 15:29:20 -0000	1.116
@@ -837,6 +837,11 @@
 		ctx->seq1 = 1;
 		ctx->seq2 = hdr->messages_count;
 	}
+	if (ctx->seq1 == (uint32_t)-1) {
+		/* no matches */
+		i_assert(ctx->seq2 == 0);
+		return 0;
+	}
 
 	i_assert(ctx->seq1 <= ctx->seq2);
 



More information about the dovecot-cvs mailing list