dovecot-1.0: Fixed "file size unexpectedly shrinked" error in so...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Oct 16 19:22:24 EEST 2007
details: http://hg.dovecot.org/dovecot-1.0/rev/74f69026f8e2
changeset: 5424:74f69026f8e2
user: Timo Sirainen <tss at iki.fi>
date: Tue Oct 16 19:22:16 2007 +0300
description:
Fixed "file size unexpectedly shrinked" error in some conditions.
diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/mbox/istream-raw-mbox.c | 4 +++-
diffs (14 lines):
diff -r c65c5aeaf115 -r 74f69026f8e2 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c Tue Oct 16 16:55:16 2007 +0300
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c Tue Oct 16 19:22:16 2007 +0300
@@ -289,7 +289,9 @@ static ssize_t _read(struct _istream *st
new_pos = from_start_pos;
} else {
/* leave out the beginnings of potential From-line + CR */
- new_pos = i - (fromp - mbox_from) - 1;
+ new_pos = i - (fromp - mbox_from);
+ if (new_pos > 0)
+ new_pos--;
}
stream->buffer = buf;
More information about the dovecot-cvs
mailing list