dovecot-1.1: Don't crash if there are no extensions.

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 13 18:23:43 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/b8b100c7771c
changeset: 7234:b8b100c7771c
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 13 18:06:03 2008 +0200
description:
Don't crash if there are no extensions.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/util/idxview.c |    5 ++++-

diffs (15 lines):

diff -r 01fc464ddddd -r b8b100c7771c src/util/idxview.c
--- a/src/util/idxview.c	Tue Feb 12 12:34:35 2008 +0200
+++ b/src/util/idxview.c	Wed Feb 13 18:06:03 2008 +0200
@@ -100,7 +100,10 @@ static void dump_extensions(struct mail_
 	const struct mail_index_ext *extensions;
 	unsigned int i, count;
 
-	extensions = array_get(&index->map->extensions, &count);
+	if (array_is_created(&index->map->extensions))
+		extensions = array_get(&index->map->extensions, &count);
+	else
+		count = 0;
 	if (count == 0) {
 		printf("no extensions\n");
 		return;


More information about the dovecot-cvs mailing list