dovecot-2.0-sslstream: mail_index_update_flags_range(): Fixed ou...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:57:25 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/57eb71a78375
changeset: 10563:57eb71a78375
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jan 19 16:51:47 2010 +0200
description:
mail_index_update_flags_range(): Fixed out-of-bounds read.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-index/mail-index-transaction-update.c |    2 +-

diffs (12 lines):

diff -r b6ea12ec49c8 -r 57eb71a78375 src/lib-index/mail-index-transaction-update.c
--- a/src/lib-index/mail-index-transaction-update.c	Tue Jan 19 16:22:10 2010 +0200
+++ b/src/lib-index/mail-index-transaction-update.c	Tue Jan 19 16:51:47 2010 +0200
@@ -523,7 +523,7 @@ mail_index_insert_flag_update(struct mai
 	/* merge everything */
 	idx = first_idx == 0 ? 0 : first_idx - 1;
 	max = I_MIN(t->last_update_idx + 1, count);
-	for (; idx < max; ) {
+	for (; idx+1 < max; ) {
 		if (updates[idx].uid2 + 1 == updates[idx+1].uid1 &&
 		    updates[idx].add_flags == updates[idx+1].add_flags &&
 		    updates[idx].remove_flags == updates[idx+1].remove_flags) {


More information about the dovecot-cvs mailing list