dovecot-2.2: lib-index: Avoid assert-crashing later if mmap(dove...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 16 18:57:46 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/a54f749f5a44
changeset: 15807:a54f749f5a44
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 06 18:29:22 2013 +0200
description:
lib-index: Avoid assert-crashing later if mmap(dovecot.index.cache) fails.

diffstat:

 src/lib-index/mail-cache.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 63117ab893dc -r a54f749f5a44 src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c	Tue Feb 05 16:48:29 2013 +0200
+++ b/src/lib-index/mail-cache.c	Wed Feb 06 18:29:22 2013 +0200
@@ -437,6 +437,7 @@
 	cache->mmap_base = mmap_ro_file(cache->fd, &cache->mmap_length);
 	if (cache->mmap_base == MAP_FAILED) {
 		cache->mmap_base = NULL;
+		cache->mmap_length = 0;
 		mail_cache_set_syscall_error(cache, "mmap()");
 		return -1;
 	}


More information about the dovecot-cvs mailing list