[dovecot-cvs] dovecot/src/lib-storage/index index-search.c, 1.112.2.1, 1.112.2.2

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


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

Modified Files:
      Tag: branch_1_0
	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.112.2.1
retrieving revision 1.112.2.2
diff -u -d -r1.112.2.1 -r1.112.2.2
--- index-search.c	20 Jun 2006 15:16:33 -0000	1.112.2.1
+++ index-search.c	20 Jun 2006 15:29:18 -0000	1.112.2.2
@@ -836,6 +836,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