Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3980:90638cc0d4e4 HEAD
Don't break if keyword_count is for some reason 0 in dbox file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 05 Feb 2006 14:08:13 +0200 |
parents | f209b3fc77e4 |
children | 0d64f8888dcd |
files | src/lib-storage/index/dbox/dbox-file.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-file.c Sun Feb 05 09:52:42 2006 +0200 +++ b/src/lib-storage/index/dbox/dbox-file.c Sun Feb 05 14:08:13 2006 +0200 @@ -232,7 +232,8 @@ } i_free(file->seeked_keywords); - file->seeked_keywords = i_malloc(file->keyword_count); + file->seeked_keywords = file->keyword_count == 0 ? NULL : + i_malloc(file->keyword_count); return 0; }