From: Timo Sirainen Date: Wed, 6 May 2015 21:01:16 +0000 (+0300) Subject: mbox: Added an extra assert X-Git-Tag: 2.2.17.rc1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=867c109fc5133a7f2d142b231f35030cb1fcd6ea;p=thirdparty%2Fdovecot%2Fcore.git mbox: Added an extra assert --- diff --git a/src/lib-storage/index/mbox/mbox-sync-rewrite.c b/src/lib-storage/index/mbox/mbox-sync-rewrite.c index 720b180854..10b12a5d7f 100644 --- a/src/lib-storage/index/mbox/mbox-sync-rewrite.c +++ b/src/lib-storage/index/mbox/mbox-sync-rewrite.c @@ -435,6 +435,7 @@ static int mbox_sync_read_and_move(struct mbox_sync_context *sync_ctx, if (first_nonexpunged && expunged_space > 0) { /* move From-line (after parsing headers so we don't overwrite them) */ + i_assert(mails[idx].from_offset >= expunged_space); if (mbox_move(sync_ctx, mails[idx].from_offset - expunged_space, mails[idx].from_offset, mails[idx].offset - mails[idx].from_offset) < 0)