dovecot: Don't allow empty keywords.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 27 18:28:56 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/840bd34df909
changeset: 6321:840bd34df909
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 27 18:03:50 2007 +0300
description:
Don't allow empty keywords.
diffstat:
1 file changed, 5 insertions(+)
src/lib-index/mail-index.c | 5 +++++
diffs (15 lines):
diff -r 58b6fb965e62 -r 840bd34df909 src/lib-index/mail-index.c
--- a/src/lib-index/mail-index.c Mon Aug 27 17:55:05 2007 +0300
+++ b/src/lib-index/mail-index.c Mon Aug 27 18:03:50 2007 +0300
@@ -309,6 +309,11 @@ int mail_index_map_parse_keywords(struct
const char *keyword = name + kw_rec[i].name_offset;
unsigned int idx;
+ if (*keyword == '\0') {
+ mail_index_set_error(index, "Corrupted index file %s: "
+ "Found empty keyword", index->filepath);
+ return -1;
+ }
(void)mail_index_keyword_lookup(index, keyword, TRUE, &idx);
array_append(&map->keyword_idx_map, &idx, 1);
}
More information about the dovecot-cvs
mailing list