dovecot-2.2: mbox: Added an extra assert
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Wed May  6 21:03:07 UTC 2015
    
    
  
details:   http://hg.dovecot.org/dovecot-2.2/rev/34b5abf6b9b7
changeset: 18535:34b5abf6b9b7
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 07 00:01:16 2015 +0300
description:
mbox: Added an extra assert
diffstat:
 src/lib-storage/index/mbox/mbox-sync-rewrite.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 94bd895721d8 -r 34b5abf6b9b7 src/lib-storage/index/mbox/mbox-sync-rewrite.c
--- a/src/lib-storage/index/mbox/mbox-sync-rewrite.c	Thu May 07 00:01:08 2015 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync-rewrite.c	Thu May 07 00:01:16 2015 +0300
@@ -435,6 +435,7 @@
 	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)
    
    
More information about the dovecot-cvs
mailing list