dovecot: Don't crash if cache record size is 0

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 13 20:05:48 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/aa8d0440b890
changeset: 6293:aa8d0440b890
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 13 20:04:43 2007 +0300
description:
Don't crash if cache record size is 0

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/util/idxview.c |    2 +-

diffs (12 lines):

diff -r 623639306046 -r aa8d0440b890 src/util/idxview.c
--- a/src/util/idxview.c	Mon Aug 13 18:58:00 2007 +0300
+++ b/src/util/idxview.c	Mon Aug 13 20:04:43 2007 +0300
@@ -292,7 +292,7 @@ static void dump_cache(uint32_t offset)
 		return;
 	}
 
-	if (rec.size > 1000000) {
+	if (rec.size == 0 || rec.size > 1000000) {
 		printf(" - cache at %u BROKEN: rec.size = %u\n",
 		       offset, rec.size);
 		return;


More information about the dovecot-cvs mailing list