dovecot-2.1: lib-index: Handle broken ext-header updates without...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jan 24 15:30:52 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/b4d8e950eb9d
changeset: 13987:b4d8e950eb9d
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 24 15:30:47 2012 +0200
description:
lib-index: Handle broken ext-header updates without crashing.

diffstat:

 src/lib-index/mail-index-sync-ext.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r c464072d05e0 -r b4d8e950eb9d src/lib-index/mail-index-sync-ext.c
--- a/src/lib-index/mail-index-sync-ext.c	Tue Jan 24 03:52:28 2012 +0200
+++ b/src/lib-index/mail-index-sync-ext.c	Tue Jan 24 15:30:47 2012 +0200
@@ -623,7 +623,7 @@
 		return 1;
 
 	ext = array_idx(&map->extensions, ctx->cur_ext_map_idx);
-	if (ext->hdr_offset + offset + size > map->hdr.header_size) {
+	if (offset + size > ext->hdr_size) {
 		mail_index_sync_set_corrupted(ctx,
 			"Extension header update points outside header size");
 		return -1;


More information about the dovecot-cvs mailing list