Mercurial > dovecot > core-2.2
changeset 10562:57eb71a78375 HEAD
mail_index_update_flags_range(): Fixed out-of-bounds read.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 19 Jan 2010 16:51:47 +0200 |
parents | b6ea12ec49c8 |
children | 45f360c1c9eb |
files | src/lib-index/mail-index-transaction-update.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ /* 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) {