dovecot: Don't crash if there are no extensions.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Feb 13 18:23:40 EET 2008
details: http://hg.dovecot.org/dovecot/rev/fd29c90047e9
changeset: 7233:fd29c90047e9
user: Timo Sirainen <tss at iki.fi>
date: Wed Feb 13 18:06:02 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 74e1dc23e441 -r fd29c90047e9 src/util/idxview.c
--- a/src/util/idxview.c Tue Feb 12 12:12:50 2008 +0200
+++ b/src/util/idxview.c Wed Feb 13 18:06:02 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