dovecot: Don't crash with empty messagesets.
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Mon Sep 24 11:15:52 EEST 2007
    
    
  
details:   http://hg.dovecot.org/dovecot/rev/c6b85cf1e63a
changeset: 6492:c6b85cf1e63a
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Sep 24 11:15:47 2007 +0300
description:
Don't crash with empty messagesets.
diffstat:
1 file changed, 3 insertions(+)
src/lib-storage/index/index-search.c |    3 +++
diffs (13 lines):
diff -r a43faaff06fd -r c6b85cf1e63a src/lib-storage/index/index-search.c
--- a/src/lib-storage/index/index-search.c	Mon Sep 24 10:43:59 2007 +0300
+++ b/src/lib-storage/index/index-search.c	Mon Sep 24 11:15:47 2007 +0300
@@ -562,6 +562,9 @@ static bool search_msgset_fix_limits(con
 static bool search_msgset_fix_limits(const struct mail_index_header *hdr,
 				     struct mail_search_seqset *set, bool not)
 {
+	if (set == NULL)
+		return FALSE;
+
 	for (; set != NULL; set = set->next) {
 		if (set->seq1 > hdr->messages_count) {
 			if (set->seq1 != (uint32_t)-1 &&
    
    
More information about the dovecot-cvs
mailing list