dovecot: Don't crash if index has no keywords at all.

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 5 19:25:19 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/ee9c8e0f25b7
changeset: 6691:ee9c8e0f25b7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 05 19:25:14 2007 +0200
description:
Don't crash if index has no keywords at all.

diffstat:

1 file changed, 2 insertions(+)
src/util/idxview.c |    2 ++

diffs (12 lines):

diff -r 040cbd9c4695 -r ee9c8e0f25b7 src/util/idxview.c
--- a/src/util/idxview.c	Sun Nov 04 15:14:12 2007 +0200
+++ b/src/util/idxview.c	Mon Nov 05 19:25:14 2007 +0200
@@ -128,6 +128,8 @@ static void dump_keywords(struct mail_in
 	unsigned int i, count;
 
 	printf("-- Keywords --\n");
+	if (!array_is_created(&index->map->keyword_idx_map))
+		return;
 
 	kw_indexes = array_get(&index->map->keyword_idx_map, &count);
 	if (count == 0)


More information about the dovecot-cvs mailing list