dovecot-2.2: mbox: Fixed infinite looping and other incorrectnes...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 29 11:00:00 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/53d5039ed212
changeset: 17665:53d5039ed212
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 29 13:58:10 2014 +0300
description:
mbox: Fixed infinite looping and other incorrectness in istream-raw-mbox.
This was caused by the recent istream invalidation checks in
i_stream_get_data().

diffstat:

 src/lib-storage/index/mbox/istream-raw-mbox.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 122d512248e7 -r 53d5039ed212 src/lib-storage/index/mbox/istream-raw-mbox.c
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c	Tue Jul 29 12:47:47 2014 +0300
+++ b/src/lib-storage/index/mbox/istream-raw-mbox.c	Tue Jul 29 13:58:10 2014 +0300
@@ -514,7 +514,7 @@
 	i_assert(rstream->seeked);
 
 	if (rstream->hdr_offset == rstream->from_offset)
-		(void)i_stream_raw_mbox_read(&rstream->istream);
+		(void)i_stream_read(stream);
 
 	if (rstream->corrupted) {
 		i_error("Unexpectedly lost From-line from mbox file %s at "
@@ -542,7 +542,7 @@
 	while (rstream->body_offset == (uoff_t)-1) {
 		i_stream_skip(stream, i_stream_get_data_size(stream));
 
-		if (i_stream_raw_mbox_read(&rstream->istream) < 0) {
+		if (i_stream_read(stream) < 0) {
 			if (rstream->corrupted) {
 				i_error("Unexpectedly lost From-line from mbox file "
 					"%s at %"PRIuUOFF_T,
@@ -625,7 +625,7 @@
 	i_assert(rstream->seeked);
 
 	if (rstream->received_time == (time_t)-1)
-		(void)i_stream_raw_mbox_read(&rstream->istream);
+		(void)i_stream_read(stream);
 	return rstream->received_time;
 }
 
@@ -637,7 +637,7 @@
 	i_assert(rstream->seeked);
 
 	if (rstream->sender == NULL)
-		(void)i_stream_raw_mbox_read(&rstream->istream);
+		(void)i_stream_read(stream);
 	return rstream->sender == NULL ? "" : rstream->sender;
 }
 
@@ -726,7 +726,7 @@
 	i_stream_seek_mark(rstream->istream.parent, offset);
 
 	if (check)
-		(void)i_stream_raw_mbox_read(&rstream->istream);
+		(void)i_stream_read(stream);
 	return rstream->corrupted ? -1 : 0;
 }
 


More information about the dovecot-cvs mailing list